/* Guess the country on the phones and the TV (web/games/clues.js). Each clue is a card; the newest is on paper (the
   paper colour, near-black text), like a quiz card just turned over, and the ones before it sit back on the surface.
   The flag is a picture clue, shown big. */

/* Flags, everywhere: the emoji, or the country code on a tile where flags don't draw. */
.cl-flag { display: inline-block; line-height: 1; }
.cl-flag.code {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.1em; padding: 0 0.15em;
  border-radius: 0.14em; background: var(--paper); color: var(--background); font-family: var(--mono); font-weight: 500;
  font-size: 0.6em; letter-spacing: 0.04em;
}

/* The clue cards. */
.cl-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
}
.cl-n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.cl-text { margin: 0; flex: 1; min-width: 0; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.cl-card.now { background: var(--paper); border-color: var(--paper); color: var(--background); box-shadow: 0 0 0 2px var(--accent); }
.cl-card.now .cl-n { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cl-card.now .cl-text { font-size: 19px; font-weight: 700; line-height: 1.3; }
.cl-card.pic { align-items: center; }
.cl-card-flag { font-size: 64px; }
.cl-pic-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.cl-card.now .cl-pic-label { color: var(--paper-muted); }

/* The phones. */
.page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cl-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 30px; }
.cl-head-end { display: inline-flex; align-items: center; gap: 8px; }
.cl-worth {
  padding: 4px 10px; border-radius: 9999px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
}
.page .cl-head .timer { font-size: 13px; }
/* A clue lasts eight seconds, so its timer would always be in its last ten: it keeps its calm look, the bar runs down. */
.timer.cl-timer.low { background: var(--accent-soft-bg); color: var(--accent); }
.timer.cl-timer.low i { background: var(--accent); }

.cl-guess { display: flex; gap: 8px; }
.cl-guess input { flex: 1; min-width: 0; }
.btn.cl-guess-go { width: auto; min-height: 52px; padding: 0 20px; }
.cl-close { margin: -4px 0 0; font-size: 15px; font-weight: 700; color: var(--crown); }
.cl-got {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-card);
  background: var(--accent-soft-bg); border: 1px solid var(--accent-soft-border);
}
.cl-got .turn-critter { width: 60px; }
.cl-got h2 .accent { color: var(--accent); }

/* The guesses. */
.cl-feed-box { display: flex; flex-direction: column; gap: 8px; }
.cl-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-row {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px 6px 6px; border-radius: 12px;
  background: var(--surface); font-size: 15px; min-width: 0;
}
.cl-row-name { font-weight: 700; white-space: nowrap; }
.cl-row-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.cl-row.got { background: var(--accent-soft-bg); }
.cl-row.got .cl-row-text { color: var(--accent); font-weight: 700; }
.cl-row.close .cl-row-text { color: var(--crown); font-weight: 600; }
.cl-feed-critter { width: 26px; }
.cl-feed-empty { margin: 0; font-size: 14px; color: var(--text-muted); }

/* The answer on a phone: the flag and the name, big; who got it, on which clue. */
.cl-answer { display: flex; align-items: center; gap: 16px; }
.cl-answer-flag { font-size: 72px; }
.cl-answer-name { overflow-wrap: anywhere; }
.cl-got-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-got-list li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px 6px 8px; border-radius: var(--radius-row); background: var(--surface); }
.cl-got-list li.none { justify-content: center; color: var(--text-soft); }
.cl-got-name { font-weight: 600; }
.cl-got-clue { flex: 1; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cl-got-list b { font-weight: 800; color: var(--accent); }

@media (min-width: 820px) {
  .cl-stack, .cl-guess, .cl-close, .cl-got, .cl-feed-box { max-width: 560px; }
}

/* The TV. */
.cl-top { display: flex; align-items: center; gap: calc(18 * var(--u)); }
.cl-tv-worth { color: var(--text); }
.tv .timer.tv-timer { font-size: calc(22 * var(--u)); }

/* The couch, smaller, so the clues get the room. */
.cl-bench { --u: calc(100vw / 1280 * 0.7); }
@media (min-aspect-ratio: 16/9) { .cl-bench { --u: calc(100vh / 720 * 0.7); } }

.cl-stage { flex: 1; min-height: 0; display: flex; align-items: stretch; gap: calc(32 * var(--u)); }
.tv .cl-stack { flex: 1.25; min-width: 0; gap: calc(10 * var(--u)); justify-content: flex-start; overflow: hidden; }
.tv .cl-card { gap: calc(16 * var(--u)); padding: calc(14 * var(--u)) calc(20 * var(--u)); border-radius: calc(20 * var(--u)); border-width: calc(2 * var(--u)); }
.tv .cl-n { width: calc(36 * var(--u)); height: calc(36 * var(--u)); font-size: calc(18 * var(--u)); border-width: calc(2 * var(--u)); }
.tv .cl-text { font-size: calc(23 * var(--u)); line-height: 1.3; }
.tv .cl-card.now { box-shadow: 0 0 0 calc(3 * var(--u)) var(--accent), 0 0 calc(40 * var(--u)) var(--glow-lamp); }
.tv .cl-card.now .cl-text { font-size: calc(27 * var(--u)); }
.tv .cl-card-flag { font-size: calc(44 * var(--u)); }
.tv .cl-pic-label { font-size: calc(16 * var(--u)); }

/* The flag, big in the middle; a question mark until it comes. */
.cl-hero { flex: 0 0 calc(290 * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(14 * var(--u)); }
.cl-flag-card {
  width: calc(290 * var(--u)); height: calc(230 * var(--u)); border-radius: calc(28 * var(--u));
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: calc(3 * var(--u)) solid var(--line-strong);
}
.cl-flag-card.soon { background: transparent; border-style: dashed; }
.cl-q { font-size: calc(130 * var(--u)); font-weight: 800; line-height: 1; color: var(--text-muted); }
.cl-hero-flag { font-size: calc(150 * var(--u)); }
.cl-flag-card:not(.soon) { box-shadow: 0 0 calc(80 * var(--u)) var(--glow-lamp); }

.cl-side { flex: 0 0 calc(330 * var(--u)); min-width: 0; display: flex; flex-direction: column; gap: calc(12 * var(--u)); overflow: hidden; }
/* Newest at the bottom; when they don't fit, the oldest go off the top. */
.tv .cl-feed.board { flex: 1; min-height: 0; gap: calc(8 * var(--u)); overflow: hidden; justify-content: flex-end; }
.tv .cl-row { min-height: calc(46 * var(--u)); padding: calc(6 * var(--u)) calc(14 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)); border-radius: calc(14 * var(--u)); gap: calc(12 * var(--u)); font-size: calc(21 * var(--u)); }
.tv .cl-feed-critter { width: calc(34 * var(--u)); }
.tv .cl-feed-empty { font-size: calc(20 * var(--u)); }

/* The reveal on the TV: the flag and the name, who got it on which clue; the scores along the bottom. */
.cl-reveal { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: calc(56 * var(--u)); }
.cl-flag-card.big { width: calc(340 * var(--u)); height: calc(270 * var(--u)); flex-shrink: 0; }
.cl-flag-card.big .cl-hero-flag { font-size: calc(180 * var(--u)); }
.cl-reveal-text { flex: 1; min-width: 0; max-width: calc(640 * var(--u)); display: flex; flex-direction: column; gap: calc(16 * var(--u)); }
.tv .cl-answer-name { color: var(--accent); }
.cl-got-tv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.cl-got-tv li { display: flex; align-items: center; gap: calc(14 * var(--u)); font-size: calc(26 * var(--u)); font-weight: 600; }
.cl-got-tv .cl-got-clue { flex: 0 1 auto; font-size: calc(17 * var(--u)); }
.cl-got-tv li b { color: var(--accent); font-weight: 800; }
.cl-got-tv li.none { color: var(--text-muted); font-weight: 400; }
.cl-got-critter { width: calc(42 * var(--u)); }
.cl-scores { display: flex; justify-content: center; flex-wrap: wrap; gap: calc(12 * var(--u)); }
.cl-score {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: calc(10 * var(--u)); align-items: center;
  min-width: calc(150 * var(--u)); padding: calc(10 * var(--u)) calc(16 * var(--u)) calc(10 * var(--u)) calc(10 * var(--u));
  border-radius: calc(18 * var(--u)); background: var(--pc); color: var(--background);
}
.cl-score-critter { grid-row: span 2; width: calc(46 * var(--u)); box-shadow: 0 0 0 calc(3 * var(--u)) var(--background); }
.cl-score-name { font-size: calc(18 * var(--u)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-score-n { font-size: calc(30 * var(--u)); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
