@font-face {
  font-family: Fredoka;
  src: url(/fonts/fredoka.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url(/fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

/*
 * Colors, all taken from the MisterTidy artwork: the lettering's cyan and navy, the frog's greens and belly, the mud,
 * and the old watercolor background's pastels. The page itself is a dark navy built on the lettering's outline.
 */
:root {
  color-scheme: dark;
  /* the page */
  --bg: #0d1823;
  --top: #0a131c;
  --card: #142434;
  --field: #0f1e2c;
  --line: #2a4560;
  --ink: #eef1e4;
  --soft: #a9b9c6;
  --hint: #7f93a5;
  /* the lettering */
  --cyan: #5ee7ec;
  --cyan-hover: #8ff0f3;
  --on-cyan: #0b2233;
  --navy: #1e5176;
  /* the frog */
  --frog: #99bc51;
  --frog-light: #b5d46b;
  --on-frog: #142008;
  --belly: #d2d79b;
  /* the mud */
  --mud: #8e6b4c;
  --mud-light: #a98560;
  --on-mud: #1d130b;
  /* the watercolor */
  --blush: #f4a99a;
  --mint: #bfd6c2;
  --butter: #eee6cb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 Nunito, system-ui, sans-serif;
}

a { color: var(--cyan); }
a:hover { color: var(--butter); }

h1, h2, h3, .tab { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 3px solid var(--mud);
  background: var(--top);
}
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; }
/* The header is a strip of the logo's own watercolor, so the frog sits on it like in the full artwork */
.top { background: url(/brand/watercolor.webp) center / cover, var(--butter); color: var(--on-cyan); }
.logo { display: block; height: 76px; width: auto; }
.wordmark { display: block; height: 40px; width: auto; }
.who { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.who button { font-size: 14px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

.intro h1 { font-size: 40px; line-height: 1.1; margin: 32px 0 10px; }
.intro p { margin: 0 0 24px; color: var(--soft); max-width: 640px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.tab {
  border: 2px solid var(--mud-light);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 16px;
  cursor: pointer;
}
.tab.on { background: var(--mud-light); color: var(--on-mud); }
.progress { margin-left: auto; color: var(--soft); font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
/* Each picture at its own shape (the big store art and the wide banner differ), never cropped */
.card .pic {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--line);
  display: block;
}
.card .nopic, .card .small-art { aspect-ratio: 616 / 353; }
.card .small-art { display: grid; place-items: center; background: var(--field); }
.card .small-art img { width: 231px; max-width: 80%; border-radius: 4px; }

.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 8px; margin-top: 10px; }
.shot { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; line-height: 0; }
.shot img { width: 100%; height: auto; aspect-ratio: 116 / 65; object-fit: cover; border-radius: 4px; background: var(--line); }
.shot:hover, .shot:focus-visible { border-color: var(--cyan); outline: none; }

.shot-box { width: min(1100px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.shot-box img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0; }
.shot-bar span { color: var(--soft); font-size: 15px; margin-right: auto; }
.card h2 { font-size: 28px; line-height: 1.15; margin: 16px 0 6px; }
.card .blurb { margin: 0 0 12px; color: var(--soft); }
.store-link { display: inline-block; margin-bottom: 8px; font-weight: 700; }

.q { border: 0; border-top: 1px dashed var(--line); margin: 16px 0 0; padding: 16px 0 0; }
.q legend { font-weight: 800; padding: 0; margin-bottom: 8px; display: block; }
.q .hint, .about .hint { color: var(--soft); font-size: 15px; }
.q .hint { margin: -4px 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  cursor: pointer;
  font-size: 15px;
}
.chip span:hover { border-color: var(--soft); }
.chip input:checked + span { border-color: var(--frog); background: var(--frog); color: var(--on-frog); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }

.lists { max-height: 220px; overflow: auto; padding: 2px; }
.new-list { margin-top: 10px; width: 100%; max-width: 360px; }

input[type=number], input[type=search], input[type=text], input:not([type]), select, textarea {
  font: inherit;
  color: inherit;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 8px 10px;
}
input::placeholder, textarea::placeholder { color: var(--hint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); }
textarea { width: 100%; min-height: 70px; resize: vertical; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline input[type=number] { width: 140px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
button { font: inherit; cursor: pointer; }
.go {
  background: var(--cyan);
  color: var(--on-cyan);
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 800;
  min-height: 44px;
}
.go:hover { background: var(--cyan-hover); }
.go:disabled { opacity: .6; cursor: default; }
.plain { background: none; border: 0; color: var(--soft); text-decoration: underline; padding: 8px; min-height: 44px; }
.plain:hover { color: var(--ink); }

.note { margin: 12px 0 0; color: var(--frog-light); font-weight: 700; }
.error { color: var(--blush); font-weight: 700; margin: 10px 0 0; }
.quiet { color: var(--soft); }

.list-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.search { flex: 1 1 240px; }
.search input { width: 100%; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.nopic { background: var(--line); }
.rows .nopic { width: 92px; height: 43px; border-radius: 4px; flex: none; }
.rows img { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; background: var(--line); flex: none; }
.rows .name { flex: 1; min-width: 0; font-weight: 700; }
.rows .meta { color: var(--soft); font-size: 14px; font-weight: 400; display: block; }
.rows button { flex: none; background: transparent; border: 2px solid var(--cyan); color: var(--cyan); border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.rows button:hover { background: var(--cyan); color: var(--on-cyan); }
.rows .done { color: var(--frog-light); font-size: 14px; font-weight: 700; flex: none; }

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  background: var(--card);
  color: var(--ink);
}
dialog::backdrop { background: rgba(5, 10, 16, .75); }
dialog h2 { margin: 0 0 6px; }
dialog p { margin: 0 0 12px; }
.field { display: grid; gap: 6px; font-weight: 700; }
.field input { width: 100%; }
.or { margin-top: 16px; color: var(--soft); }

.welcome { width: min(620px, calc(100vw - 32px)); max-height: 88vh; padding: 0; overflow: hidden; }
.welcome .scroll { padding: 28px 28px 8px; overflow: hidden auto; max-height: calc(88vh - 84px); }
.welcome h2 { font-size: 30px; margin-bottom: 14px; }
.welcome h3 { font-size: 21px; margin: 22px 0 8px; }
.welcome ul, .welcome ol { margin: 0 0 12px; padding-left: 22px; }
.welcome li { margin-bottom: 4px; }
.welcome .sig { font-family: Fredoka, Nunito, sans-serif; font-size: 20px; margin-top: 18px; color: var(--belly); }
.welcome .end { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 28px 20px; border-top: 1px solid var(--line); margin: 0; }
.define { background: var(--field); border: 1px dashed var(--mud-light); border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px; }

footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; color: var(--soft); font-size: 15px; border-top: 1px solid var(--line); }
footer .small { font-size: 13px; }
footer button { color: var(--cyan); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 520px) {
  .top { padding: 8px 12px; }
  .logo { height: 48px; }
  .wordmark { height: 22px; }
  .who { gap: 4px; }
  .who .anon { display: none; }
  .who .plain { white-space: nowrap; }
  .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
  .who .plain { padding: 8px 6px; }
  .intro h1 { font-size: 32px; }
  .card { padding: 14px; }
  .card h2 { font-size: 24px; }
  .rows img { width: 70px; height: 33px; }
  .welcome .scroll { padding: 20px 18px 8px; }
  .welcome .end { padding: 14px 18px 18px; }
}

/* The note after the welcome, for someone without a name */
.name-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--mud-light);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.name-note h2 { font-size: 20px; margin: 0 28px 8px 0; }
.name-note p { margin: 0 0 8px; }
.name-note ul { margin: 0 0 8px; padding-left: 20px; }
.name-note li { margin-bottom: 4px; }
.name-note .small { font-size: 14px; color: var(--soft); }
.name-note .row { margin-top: 12px; }
.name-note a.go { text-decoration: none; display: inline-flex; align-items: center; }
.name-note .close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: none; color: var(--soft); font-size: 24px; line-height: 1; border-radius: 8px; }
.name-note .close:hover { color: var(--ink); background: var(--field); }
.anon { color: var(--soft); }

/* Wide screens: more room, the game beside its questions, the list in two columns */
@media (min-width: 1000px) {
  main, footer { max-width: 1180px; }
  /* The header's colors run edge to edge, but what's in it lines up with the page below */
  .top { padding: 10px max(32px, calc((100% - 1180px) / 2 + 16px)); }
  .card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; padding: 28px; align-items: start; }
  .card #answer > .q:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
  .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .rows li.quiet { grid-column: 1 / -1; }
  .shot-box { width: min(1280px, calc(100vw - 48px)); }
}

/* A popup keeps its scrolling to itself: reaching the end doesn't scroll the page behind it */
.welcome .scroll, .name-note, .shot-box, dialog { overscroll-behavior: contain; }
html:has(dialog[open]) { overflow: hidden; }

/* The numbers across the top, with the Discord and Steam links */
.statbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 10px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--soft); }
.stats li { white-space: nowrap; }
.stats strong { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 18px; color: var(--belly); }
.statlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.statlinks a { min-height: 40px; padding: 8px 16px; display: inline-flex; align-items: center; border-radius: 10px; font-weight: 800; font-size: 15px; text-decoration: none; }
.statlinks .ghost { border: 2px solid var(--mud-light); color: var(--ink); }
.statlinks .ghost:hover { background: var(--mud-light); color: var(--on-mud); }
.statlinks .go:hover { color: var(--on-cyan); }
@media (min-width: 1000px) {
  .statbar { padding: 10px max(32px, calc((100% - 1180px) / 2 + 16px)); }
}
@media (max-width: 520px) {
  /* On a phone the numbers scroll sideways in one line, and the two links share a row */
  .statbar { padding: 8px 12px; }
  .stats { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding: 0 24px 4px 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .statlinks { width: 100%; }
  .statlinks a { flex: 1; justify-content: center; }
}

/* On a computer the two links sit in the header's top right; on a phone, under the numbers */
.top .right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; white-space: nowrap; }
.barlinks { display: none; }
@media (max-width: 760px) {
  .toplinks { display: none; }
  .barlinks { display: flex; }
  /* Scrolled down, they get out of the way so the bars at the top take less room */
  .masthead.scrolled .barlinks { display: none; }
}


/* On the watercolor everything in the header is dark navy */
.top .who, .top .anon, .top .plain { color: var(--on-cyan); }
.top .plain:hover { color: var(--navy); }
.top .statlinks .go { background: var(--on-cyan); color: var(--ink); }
.top .statlinks .go:hover { background: var(--navy); color: var(--ink); }
.top .statlinks .ghost { border-color: var(--on-cyan); color: var(--on-cyan); }
.top .statlinks .ghost:hover { background: var(--on-cyan); color: var(--ink); }
.top :focus-visible { outline: 3px solid var(--on-cyan); outline-offset: 2px; }

/* The header and the numbers under it stay at the top while the page scrolls (not on a short screen, like a phone on its side) */
@media (min-height: 600px) {
  .masthead { position: sticky; top: 0; z-index: 4; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
}

/* When the numbers were last updated: right after the last number if it fits on that row, its own line if not */
.statwrap { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.statwrap .stats { display: contents; }
.stats-when { margin: 0; font-size: 12px; color: var(--hint); }
@media (max-width: 520px) {
  /* On a phone the numbers scroll sideways in one line, with the note under them */
  .statwrap { width: 100%; gap: 4px; }
  .statwrap .stats { display: flex; }
  .stats-when { margin: 0; }
}

/* A list's description, over it */
.tip {
  position: fixed;
  z-index: 6;
  max-width: min(300px, calc(100vw - 16px));
  padding: 8px 12px;
  background: var(--butter);
  color: var(--on-cyan);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  pointer-events: none;
}

/* The test copy's strip across the top (only there) */
.test-copy { margin: 0; padding: 6px 16px; background: var(--blush); color: var(--on-mud); font-weight: 800; font-size: 14px; text-align: center; }

/* Previous and Next, above the game */
.game-nav { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ghost-btn { background: none; border: 2px solid var(--mud-light); color: var(--ink); border-radius: 10px; padding: 6px 16px; font-weight: 800; min-height: 40px; }
.ghost-btn:hover:not(:disabled) { background: var(--mud-light); color: var(--on-mud); }
.ghost-btn:disabled { opacity: .4; cursor: default; }
.ghost-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
