/* Public site screens (S1 to S9): the few pieces pajamo.css does not have. Tokens only. */

/* The footer marks the current page the way the header does. */
.site-foot a[aria-current] {
  text-decoration: underline wavy;
}

/* Two equal columns that fold to one on a phone. */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: center;
}
.split--top {
  align-items: start;
}
.split__col {
  display: grid;
  gap: var(--space-xl);
  align-content: start;
}

/* Home hero, right-hand side: the product as notes stuck on the page. */
.hero-notes {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding-block: var(--space-md);
}
/* Wide enough for a room code's six tiles in their two groups */
.hero-notes__code {
  justify-self: start;
  width: min(100%, 25rem);
  margin-left: var(--space-md);
}
.hero-notes__players {
  justify-content: flex-end;
  justify-self: end;
  max-width: 21rem;
}

/* A list with no bullets, for notes and filter rows. */
.plain {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.plain--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* Second pass. Local fixes for things the shared system does on the site pages. */

/* Notes in a row are stretched to the same height; their words stay at the top
   instead of spreading out to fill the taller ones. */
.cards > li,
.steps > li {
  align-content: start;
}
/* A game that is not ready is quieter, but stays a solid note: the see-through
   version let the ruled lines of the page run through its words. */
.game-card--locked {
  opacity: 1;
  color: var(--color-muted);
}
/* The games filter: the number picker is the same height as the buttons beside it. */
.filter {
  gap: var(--space-sm) var(--space-lg);
}
.filter .field select {
  width: auto;
  min-height: 44px;
  padding-block: 0;
  font-size: var(--text-body);
}
/* A quiet link beside the main button lines up with the text when it wraps below. */
.hero__actions {
  align-items: center;
}
.hero__actions .btn--quiet {
  padding-inline: 0;
}
/* A page title that is still to be decided keeps the weight of a title. */
.hero h1 .todo {
  font-size: var(--text-head);
  line-height: 1.2;
}
/* Party Pass choices: name and price on one line, the note under them. */
.choice--plan {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-md);
  align-items: baseline;
}
.choice--plan .hint {
  grid-column: 1 / -1;
}
/* The price a year would cost month by month, crossed out beside the yearly price. */
.was {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: var(--text-body);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
/* Long text pages: a heading sits closer to its own paragraph than to the one before. */
.prose h2 {
  margin-top: var(--space-md);
}

@media (max-width: 48rem) {
  /* Phone header in two rows: logo and the button, then the three links. */
  .site-nav nav,
  .site-nav .site-nav__links {
    display: contents;
  }
  .site-nav::before {
    content: '';
    flex-basis: 100%;
    order: 1;
  }
  .site-nav .site-nav__links > li {
    order: 2;
  }
  .site-nav .site-nav__links > li:has(.btn) {
    order: 0;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-notes__code {
    margin-left: 0;
  }
}
/* Narrow phones: the big buttons step down a size so their words stay on one line. */
@media (max-width: 30rem) {
  .site .btn:not(.btn--small, .btn--quiet) {
    padding-inline: var(--space-md);
    font-size: var(--text-body);
    text-wrap: balance;
  }
  .site-nav .pj-logo {
    font-size: 0.85rem;
  }
  .site-nav .btn--small {
    padding-inline: var(--space-sm);
  }
  .hero-notes .pj-logo--big {
    font-size: 2.1rem;
  }
}

/* Free beside the pass: two notes, side by side, stacked on a small phone */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
@media (max-width: 30rem) {
  .compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The room-code box on the home page, for guests who typed the address */
.code-entry {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}
/* Room for a room code as people type it: "KFT MQZ" or "KFT-MQZ" */
.code-entry input {
  width: 10.5rem;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: var(--border-drawn);
  border-radius: var(--radius-drawn);
  background: var(--color-card);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-name);
  text-align: center;
  text-transform: uppercase;
}
/* Narrow phones: the question on its own line, then the field and Join side by side */
@media (max-width: 30rem) {
  .code-entry label {
    flex-basis: 100%;
  }
  .code-entry input {
    flex: 1 1 8rem;
    width: auto;
    min-width: 0;
  }
}

/* The games page at catalogue size: a finder, shelves, and compact tiles */
.finder {
  display: grid;
  gap: var(--space-md);
}
.finder__search {
  display: flex;
  gap: var(--space-sm);
  max-width: 34rem;
}
.finder__search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--space-md);
  border: var(--border-drawn);
  border-radius: var(--radius-drawn);
  background: var(--color-card);
  color: var(--color-ink);
  font-size: var(--text-body);
}
.finder__picks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  align-items: center;
}
.pick {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  font-size: var(--text-small);
}
.pick select {
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-drawn);
  background: var(--color-card);
  color: var(--color-ink);
  font-size: var(--text-small);
}
.finder__check {
  align-items: center;
  font-size: var(--text-small);
}
.shelves {
  gap: var(--space-xl);
}
.shelf {
  display: grid;
  gap: var(--space-md);
}
.shelf__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  align-items: baseline;
  justify-content: space-between;
}
.shelf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--space-lg) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
  min-width: 0;
}
.tile__link {
  display: grid;
  gap: var(--space-xs);
  color: inherit;
  text-decoration: none;
}
.tile__art {
  --swatch: var(--color-yellow);
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--tooth), var(--swatch);
  background-blend-mode: multiply;
  box-shadow: var(--shadow-sticky);
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  rotate: -1.5deg;
}
.tile:nth-child(even) .tile__art {
  rotate: 1.2deg;
}
.tile__art--pink {
  --swatch: var(--color-pink);
}
.tile__art--green {
  --swatch: var(--color-green);
}
.tile__art--blue {
  --swatch: var(--color-blue);
}
.tile__art--white {
  --swatch: var(--color-card);
}
.tile__art--kraft {
  --swatch: var(--color-paper-2);
}
.tile__art--big {
  font-size: 7rem;
  rotate: none;
  box-shadow: none;
}
.tile__name {
  font-family: var(--font-display);
  font-size: var(--text-body);
  line-height: 1.15;
  text-decoration: underline;
  overflow-wrap: break-word;
}
.tile__meta {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: 1.25;
}
.tile__marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.tile__marks .mark {
  padding: 0 var(--space-xs);
  font-size: 1rem;
}
.tile--soon .tile__art {
  opacity: 0.55;
}
.mark--new {
  background: var(--color-yellow);
}

/* The game page: one line about the game, the facts at a glance, one action, then pictures */
.game-line {
  font-size: var(--text-name);
  line-height: 1.3;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts b {
  font-weight: 400;
  text-decoration: underline wavy;
  text-underline-offset: 0.2em;
}
.play-panel {
  gap: var(--space-sm);
  justify-items: start;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}
.play-panel .btn {
  width: auto;
}
.play-panel .btn--big {
  min-width: min(100%, 16rem);
  min-height: 4.5rem;
}
.play-panel .btn--big .btn__main {
  font-size: var(--text-head);
}
/* A button with two lines: what it is, then what it does */
.btn--two {
  flex-direction: column;
  gap: 0;
  padding-block: var(--space-xs);
  line-height: 1.15;
}
.btn__sub {
  font-family: var(--font-body);
  font-size: var(--text-body);
}
.previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.preview {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
}
.preview:first-child {
  grid-column: 1 / -1;
}
.preview__pic {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--border-drawn);
  background: var(--tooth), var(--color-card);
  background-blend-mode: multiply;
}
.preview:first-child .preview__pic {
  aspect-ratio: 16 / 9;
}
.preview__pic > .court {
  width: 100%;
  border: 0;
}
.preview__pic > .tile__art {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.preview figcaption {
  color: var(--color-muted);
  font-size: var(--text-small);
}
.tile__art--flat {
  box-shadow: none;
  rotate: none;
}
.pad--mini {
  width: 100%;
  min-height: 100%;
  border: 0;
}
.pad--mini .pad__thumb {
  width: 3rem;
  height: 3rem;
}
.score--mini {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.score--mini .score__num {
  font-size: 3rem;
}
