/* Couchnight's homepage, in the Quiet Games site style (quietgames/site/kingsrow/style.css):
   dark ground, Bricolage Grotesque and IBM Plex Mono, the coral accent. The game pages use tokens.css. */
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --background: #121314;
  --surface: #1c1e20;
  --line: #2a2d30;
  --text: #eeebe5;
  --soft: #d8d4cc;
  --muted: #a6a29a;
  --accent: #e07a5f;
  --accent-text: #121314;
  --accent-light: #f0a58f;
  --accent-soft: #221b1a;
  --accent-border: #4c3029;
  /* The games' tiles, behind their pictures, in turn. */
  --tile-a: #f2b23a;
  --tile-b: #8aa4f0;
  --tile-c: #5fb3a6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--background); color: var(--text); font-family: "Bricolage", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-light); }
a:hover { color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.meta { font-family: "Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

header.bar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand { flex-shrink: 0; }
nav.links a { white-space: nowrap; }
nav.links { display: flex; gap: 18px; }
nav.links a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav.links a:hover { color: var(--text); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 36px 0 72px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 62px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin: 12px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent-light); }
.lede { font-size: 19px; line-height: 1.5; color: var(--soft); margin: 0 0 26px; max-width: 540px; }

.join { background: var(--surface); border-radius: 18px; padding: 18px; max-width: 460px; margin-bottom: 18px; }
.join label { display: block; margin-bottom: 10px; color: var(--accent-light); }
.join-row { display: flex; gap: 10px; }
.join input {
  flex: 1; min-width: 0; height: 58px; padding: 0 18px; border-radius: 14px;
  border: 2px solid var(--accent-border); background: var(--background); color: var(--text);
  font-family: inherit; font-size: 30px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase;
}
.join input::placeholder { color: #4a4d50; }
.join input:focus { outline: none; border-color: var(--accent); }
.join button {
  height: 58px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-family: inherit; font-size: 17px; font-weight: 600;
}
.join button:active { opacity: 0.8; }
.join .hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; border: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.soon svg { flex-shrink: 0; color: var(--accent-light); }
.soon[hidden] { display: none; }
a.soon.store { color: var(--text); border-color: var(--accent-border); text-decoration: none; }
a.soon.store:hover { background: var(--accent-soft); }

.scene { position: relative; padding-bottom: 70px; }
.tv-frame { border-radius: 16px; border: 9px solid #08090a; background: #000; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); overflow: hidden; }
.tv-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.scene .phone {
  position: absolute; right: -8px; bottom: 0; width: 34%; max-width: 190px;
  border-radius: 28px; border: 5px solid #2a2d30; background: #000; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); transform: rotate(4deg);
}
.scene .phone img { width: 100%; }

section h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 8px; }
.steps-section { padding-bottom: 64px; }
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { background: var(--surface); border-radius: 18px; padding: 22px; }
.steps .n {
  width: 36px; height: 36px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent-light); display: flex; align-items: center; justify-content: center;
  font-family: "Plex Mono", ui-monospace, monospace; font-size: 14px; margin-bottom: 14px;
}
.steps h3, .game-card h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.steps p, .game-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

section.strip { padding-bottom: 64px; }
section.strip p.lede { margin-bottom: 24px; }
.wide-shot { margin: 0 0 18px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.game-card { background: var(--surface); border-radius: 18px; padding: 22px; }
.game-card.later { background: none; border: 1px dashed var(--line); }
.game-art { width: 96px; height: 96px; border-radius: 22px; padding: 8px; margin-bottom: 14px; background: var(--tile-a); }
.game-card:nth-child(3n+2) .game-art { background: var(--tile-b); }
.game-card:nth-child(3n) .game-art { background: var(--tile-c); }
/* A live game's card is a link to its page. */
a.game-card { display: block; color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color 0.15s, transform 0.4s cubic-bezier(0.3, 1.8, 0.4, 1); }
a.game-card:hover { border-color: var(--accent); color: inherit; }
a.game-card:active { transform: scale(0.98); transition-duration: 0.08s; }
.game-card .more { display: inline-block; margin-top: 12px; color: var(--accent-light); font-size: 15px; font-weight: 600; }
.game-card .more::after { content: " →"; }
.game-card .game-facts { margin: 0 0 8px; font-family: "Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.game-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tag { font-family: "Plex Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); background: var(--accent); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.tag.soon-tag { background: none; color: var(--accent-light); border: 1px solid var(--accent-border); }

section.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 64px; }
.value { background: var(--surface); border-radius: 18px; padding: 22px; }
.value .icon { width: 44px; height: 44px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-light); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.value h2 { font-size: 20px; margin: 0 0 8px; }
.value p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Every page's footer: Support, Privacy, then the page in each language. */
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; display: grid; gap: 16px; color: var(--muted); font-size: 14px; }
.foot-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer nav.langs { align-items: baseline; gap: 8px 16px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover, footer a[aria-current] { color: var(--text); }

@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: a column must never grow to the widest picture's own size. */
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 12px; gap: 32px; }
  .steps, .game-grid, section.values { grid-template-columns: minmax(0, 1fr); }
  .scene { max-width: 560px; }
}
@media (max-width: 640px) {
  /* Room for the longer languages' labels: Play online is further down the page anyway, Games and Blog in the footer. */
  nav.links { gap: 14px; }
  nav.links a { font-size: 14px; }
  nav.links .nav-online, nav.links .nav-more { display: none; }
}
@media (min-width: 641px) and (max-width: 900px) {
  /* Five links don't fit beside the name in the longer languages: Play online is further down the homepage. */
  nav.links .nav-online { display: none; }
}
@media (max-width: 420px) {
  nav.links { gap: 12px; }
  nav.links a:last-child { display: none; }
  .join-row { flex-direction: column; }
  .join button { width: 100%; }
}
.host-link { margin: 0 0 18px; color: var(--soft); font-size: 16px; line-height: 1.5; max-width: 460px; }

/* Play online: the public rooms open right now (home.js). */
.online { padding: 24px 0 64px; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; margin: 22px 0 18px; }
.room-card {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.4s cubic-bezier(0.3, 1.8, 0.4, 1);
}
.room-card:hover { border-color: var(--accent); }
.room-card:active { transform: scale(0.97); transition-duration: 0.08s; }
.room-art { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; background: #8aa4f0; padding: 6px; }
.room-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.room-text strong { font-size: 17px; }
.room-text span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.room-go { padding: 8px 14px; border-radius: 9999px; background: var(--accent); color: #121314; font-weight: 600; font-size: 14px; }

/* The privacy and support pages: one column of reading. */
.prose { max-width: 720px; padding: 20px 0 64px; }
.prose h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; margin: 10px 0 18px; }
.prose h2 { font-size: 22px; letter-spacing: -0.01em; margin: 34px 0 10px; }
.prose p { font-size: 17px; line-height: 1.6; color: var(--soft); margin: 0 0 14px; }
.prose .lede { max-width: none; }
.prose strong { color: var(--text); }


/* Support: write to us, the facts, the sections, Free and Plus side by side. */
.prose h3 { font-size: 18px; letter-spacing: -0.01em; margin: 24px 0 6px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; font-size: 17px; line-height: 1.6; color: var(--soft); }
.prose li { margin-bottom: 6px; }
.prose section { scroll-margin-top: 16px; }
.write {
  display: flex; align-items: center; gap: 16px; margin: 4px 0 14px; padding: 18px 20px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color 0.15s;
}
.write:hover { border-color: var(--accent); color: inherit; }
.write .icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-light); display: flex; align-items: center; justify-content: center; }
.write-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.write-text strong { font-size: 18px; }
.write-text span { color: var(--accent-light); font-size: 16px; overflow-wrap: anywhere; }
.write-text .muted { color: var(--muted); font-size: 15px; line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.facts div { background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.facts dt { margin: 0 0 6px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.4; color: var(--text); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.toc a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); text-decoration: none; font-size: 14px; }
.toc a:hover { border-color: var(--accent); color: var(--text); }
.plays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; margin: 6px 0 16px; }
.play-col { background: var(--surface); border-radius: 16px; padding: 16px 18px; }
.play-col .meta { margin: 0; }
.play-col.plus .meta { color: var(--accent-light); }
.prose .play-col ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 16px; line-height: 1.4; }
.prose .play-col li { margin: 0; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); }
.prose .play-col li.later { color: var(--muted); }
@media (max-width: 640px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plays { grid-template-columns: minmax(0, 1fr); }
}

/* On an English page, this page in the visitor's own language (site.js). */
.suggest-bar { padding: 10px 20px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-border); text-align: center; font-size: 15px; }
.suggest-bar a { color: var(--accent-light); font-weight: 600; text-decoration: none; }
.suggest-bar a:hover { color: var(--text); }
.suggest-bar a::after { content: " →"; }

/* The pages made by the server (site.js, blog.js): the games, a game, the blog, an article, not found. */
.page { padding: 8px 0 64px; }
.page > h1, .article-head h1 { font-size: clamp(34px, 6vw, 54px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; margin: 10px 0 16px; }
.page > .lede { max-width: 680px; }
.page.narrow { max-width: 720px; min-height: 50vh; }
.page section { scroll-margin-top: 16px; }
.muted { color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--soft); }

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; }
.button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 16px; font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.button:hover { border-color: var(--accent); color: var(--text); }
.button svg { flex-shrink: 0; color: var(--accent-light); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary svg { color: var(--accent-text); }
.button.primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--accent-text); }

/* A game's page. */
.game-hero { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 40px; align-items: center; padding: 6px 0 56px; }
.game-hero h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin: 10px 0 14px; }
.game-pic { border-radius: 36px; padding: 18px; background: var(--tile-a); aspect-ratio: 1; }
.game-pic.tile-1 { background: var(--tile-b); }
.game-pic.tile-2 { background: var(--tile-c); }
.game-pic img { width: 100%; height: 100%; object-fit: contain; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.chips li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.need { padding-bottom: 48px; max-width: 760px; }
.need ul { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; gap: 10px; }
.need li { background: var(--surface); border-radius: 16px; padding: 16px 18px; font-size: 16px; line-height: 1.5; color: var(--soft); }
.need li strong { color: var(--text); }
.need p { font-size: 17px; line-height: 1.55; color: var(--soft); margin: 0 0 10px; }
.need p.muted { color: var(--muted); font-size: 15px; }
.cta { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 22px; padding: 26px; margin-bottom: 64px; }
.cta h2 { margin-top: 0; }
.cta p { color: var(--soft); font-size: 17px; line-height: 1.5; margin: 0 0 16px; max-width: 620px; }

/* Article cards: the blog, the homepage, a game's page. */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0 18px; }
.post-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 18px; background: var(--surface);
  border: 1px solid transparent; color: inherit; text-decoration: none; transition: border-color 0.15s;
}
.post-card:hover { border-color: var(--accent); color: inherit; }
.post-card h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* An article: one column of reading, the way to play, the questions. */
.article-head { max-width: 760px; }
.article-head .lede { max-width: none; font-size: 20px; }
.byline { margin: -8px 0 22px; color: var(--muted); font-size: 14px; font-family: "Plex Mono", ui-monospace, monospace; letter-spacing: 0.04em; }
.article .toc { max-width: 760px; margin-bottom: 18px; }
.read { max-width: 720px; }
.read h2 { font-size: clamp(24px, 3.4vw, 30px); letter-spacing: -0.02em; margin: 40px 0 12px; }
.read p { font-size: 18px; line-height: 1.65; color: var(--soft); margin: 0 0 16px; }
.read strong { color: var(--text); }
.read .list { margin: 0 0 18px; padding-left: 22px; font-size: 18px; line-height: 1.6; color: var(--soft); }
.read .list li { margin-bottom: 10px; }
.read .list li::marker { color: var(--accent); }
.game-grid.inline { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 20px; }
.app-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 26px; align-items: center; margin: 44px 0 8px;
  padding: 26px; border-radius: 22px; background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.read .app-cta h2 { margin: 6px 0 10px; }
.read .app-cta p { font-size: 17px; }
.app-cta .phone { border-radius: 22px; border: 4px solid var(--line); background: #000; overflow: hidden; transform: rotate(3deg); }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-size: 18px; font-weight: 600; color: var(--text); list-style-position: outside; }
.faq summary::marker { color: var(--accent-light); }
.faq details p { margin: 0 0 16px; }

@media (max-width: 860px) {
  .game-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 40px; }
  .game-pic { max-width: 220px; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .game-grid.inline { grid-template-columns: minmax(0, 1fr); }
  .app-cta { grid-template-columns: minmax(0, 1fr); }
  .app-cta .phone { display: none; }
  .read p, .read .list { font-size: 17px; }
}
.article .read + .strip { margin-top: 56px; }

/* /games: the search and filters over the list (games-list.js), then a section each for free, Plus and coming soon. */
.game-tools { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 28px; }
.game-tools[hidden], .game-none[hidden], .game-section[hidden], .game-card[hidden] { display: none; }
.game-search {
  width: 100%; max-width: 560px; height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 17px;
}
.game-search:focus { outline: none; border-color: var(--accent); }
.game-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 38px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
select.chip { padding-right: 12px; }
.game-none { color: var(--soft); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-light); text-decoration: underline; cursor: pointer; }
.game-section { margin: 0 0 40px; }
.game-section h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.game-section h2 .count { font-family: "Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--accent); font-weight: 500; }
.section-lede { margin: 0 0 18px; color: var(--muted); }
