/* Punchline on the phones and the TV (web/games/punchline.js). The prompt sits on a paper card with its blank as a
   coral line, filled in as each answer is shown; on the TV each answer takes the stage with its writers, then its
   votes land as critters in their colours; the room's favourite lights up in the accent. */

/* The phones. */
.page .pl-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.page .pl-line .timer { font-size: 14px; }
.pl-double {
  padding: 5px 12px; border-radius: 9999px; background: var(--accent); color: var(--accent-text);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.pl-card {
  padding: 18px 20px 22px; border-radius: var(--radius-tile); background: var(--paper); color: var(--background);
  display: flex; flex-direction: column; gap: 8px; transition: box-shadow 0.4s ease;
}
.pl-card .meta { color: var(--paper-muted); }
.pl-prompt { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pl-card.mini { padding: 12px 16px 14px; gap: 4px; }
.pl-card.mini .pl-prompt { font-size: 18px; }
.pl-card.lit { box-shadow: 0 0 0 3px var(--accent), 0 0 40px var(--glow-lamp); }
.pl-blank {
  display: inline-block; width: 3.6em; height: 0.9em; margin: 0 0.1em; vertical-align: baseline;
  border-bottom: 0.14em solid var(--accent);
}
.pl-fill { color: var(--accent-deep); }

.pl-form { display: flex; flex-direction: column; gap: 10px; }
.pl-form label.meta { margin-bottom: 0; }
.pl-field { display: flex; gap: 8px; }
.pl-field input[type="text"] { flex: 1; min-width: 0; }
.btn.pl-send { width: auto; flex-shrink: 0; min-height: 52px; padding: 0 22px; }
.pl-sent {
  padding: 14px 14px 14px 18px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.pl-sent-what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-sent-text { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.btn.pl-small { width: auto; flex-shrink: 0; min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Who's done: small critters, faded until they are, then a check. A wide screen has the list beside instead. */
.pl-strip { display: flex; flex-direction: column; gap: 10px; }
.pl-strip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-mini { position: relative; display: block; transition: opacity 0.3s ease; }
.pl-mini:not(.done) { opacity: 0.4; }
.pl-mini-critter { display: block; width: 38px; }
.pl-mini-tick {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 9999px;
  background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--background);
}
.pl-mini-tick svg { width: 12px; height: 12px; }
@media (min-width: 820px) { .pl-strip { display: none; } }

/* Voting: the answers as a list to tap, yours marked and not tappable. */
.pl-choices { display: flex; flex-direction: column; gap: 10px; }
.pl-choice-row { display: flex; align-items: center; gap: 6px; }
.pl-choice {
  flex: 1; min-width: 0; min-height: 58px; padding: 12px 16px; border-radius: var(--radius-card);
  border: 2px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; transition: transform 0.45s cubic-bezier(0.3, 1.8, 0.4, 1), border-color 0.2s, background-color 0.2s;
}
.pl-choice:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.08s; }
.pl-choice-text { font-size: 18px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.pl-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft-bg); }
.pl-choice:disabled { opacity: 0.55; cursor: not-allowed; }
.pl-choice .tick { position: static; flex-shrink: 0; }
.pl-hide { color: var(--accent); }
.pl-note {
  margin: 0; padding: 12px 16px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; line-height: 1.4; color: var(--text-soft);
}

/* The reveal on a phone: the answer on show, then the ones already shown. */
.pl-intro { margin: 0; padding: 26px 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; color: var(--text-soft); text-align: center; }
.pl-stage {
  padding: 18px 18px 16px; border-radius: var(--radius-tile); background: var(--surface); border: 2px solid var(--line-strong);
  display: flex; flex-direction: column; gap: 12px;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.pl-stage.fav { background: var(--accent-soft-bg); border-color: var(--accent); box-shadow: 0 0 40px var(--glow-lamp); }
.pl-fav-line { margin: 0; color: var(--accent); }
.pl-stage-text { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.pl-stage-by { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text-soft); }
.pl-stage-votes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 36px; }
.pl-stage-count { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pl-stage.fav .pl-stage-count { color: var(--accent); }
.pl-voters { display: flex; flex-wrap: wrap; gap: 4px; }
.pl-voter { display: block; }
.pl-voter-critter { display: block; width: 32px; }
.pl-stage-pts { margin-left: auto; font-size: 22px; font-weight: 800; color: var(--accent); }

.pl-heads { display: flex; align-items: center; flex-shrink: 0; padding-right: 8px; }
.pl-head { display: block; margin-right: -8px; }
.pl-head-critter { display: block; width: 30px; box-shadow: 0 0 0 2px var(--surface); }
.pl-stage.fav .pl-head-critter { box-shadow: 0 0 0 2px var(--accent-soft-bg); }

.pl-answers { display: flex; flex-direction: column; gap: 10px; }
.pl-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-row {
  min-height: 52px; padding: 8px 14px 8px 16px; border-radius: var(--radius-row); background: var(--surface);
  border: 2px solid transparent; display: flex; align-items: center; gap: 12px;
}
.pl-row.mine { border-color: var(--line-strong); }
.pl-row.fav { border-color: var(--accent); background: var(--accent-soft-bg); }
.pl-row.fav .pl-head-critter { box-shadow: 0 0 0 2px var(--accent-soft-bg); }
.pl-row-text { flex: 1; min-width: 0; font-size: 16px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.pl-row-n {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9999px; background: var(--background); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; font-weight: 500;
}
.pl-row.fav .pl-row-n { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* The TV. */
.pl-tvprompt {
  margin: 0; align-self: flex-start; max-width: 100%; padding: calc(30 * var(--u)) calc(40 * var(--u)) calc(36 * var(--u));
  border-radius: calc(32 * var(--u)); background: var(--paper); color: var(--background);
  font-size: calc(58 * var(--u)); line-height: 1.16; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere;
  transition: box-shadow 0.45s ease;
}
.pl-tvprompt.small {
  flex-shrink: 0; padding: calc(16 * var(--u)) calc(28 * var(--u)) calc(18 * var(--u)); border-radius: calc(22 * var(--u));
  font-size: calc(30 * var(--u)); line-height: 1.2;
}
.pl-tvprompt .pl-blank { border-bottom-width: 0.12em; }
.pl-tvprompt.known { box-shadow: 0 0 0 calc(4 * var(--u)) var(--accent), 0 0 calc(60 * var(--u)) var(--glow-lamp); }

/* Voting: lettered cards, three across; past six, three rows of up to four across, and the couch smaller. */
.pl-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(16 * var(--u)); align-content: center; }
.pl-cards.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-tvcard {
  display: flex; align-items: center; gap: calc(16 * var(--u)); min-height: calc(92 * var(--u)); padding: calc(14 * var(--u)) calc(20 * var(--u));
  border-radius: calc(20 * var(--u)); background: var(--surface); border: calc(2 * var(--u)) solid var(--line-strong);
}
.pl-letter {
  flex-shrink: 0; width: calc(44 * var(--u)); height: calc(44 * var(--u)); border-radius: 9999px; background: var(--paper); color: var(--background);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 500; font-size: calc(22 * var(--u));
}
.pl-tvtext { font-size: calc(30 * var(--u)); font-weight: 800; letter-spacing: -0.01em; line-height: 1.12; overflow-wrap: break-word; min-width: 0; }
.pl-cards.many {
  grid-auto-rows: minmax(0, 1fr); align-content: stretch; gap: calc(10 * var(--u)); margin: calc(-12 * var(--u)) 0;
}
.pl-cards.many .pl-tvcard { min-height: 0; gap: calc(12 * var(--u)); padding: calc(8 * var(--u)) calc(14 * var(--u)) calc(8 * var(--u)) calc(12 * var(--u)); border-radius: calc(16 * var(--u)); }
.pl-cards.many .pl-letter { width: calc(36 * var(--u)); height: calc(36 * var(--u)); font-size: calc(18 * var(--u)); }
.pl-cards.many .pl-tvtext {
  font-size: calc(24 * var(--u)); hyphens: auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.pl-cards.many.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pl-cards.many.cols-4 .pl-tvtext { font-size: calc(22 * var(--u)); }
.pl-bench { --u: calc(100vw / 1280 * 0.7); }
@media (min-aspect-ratio: 16/9) { .pl-bench { --u: calc(100vh / 720 * 0.7); } }

/* The reveal: one answer on the stage, who wrote it on the left, its votes landing on the right. */
.pl-tvstage {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(20 * var(--u)); text-align: center;
}
.pl-tvstage.intro { justify-content: center; }
.pl-tvstage .pl-intro { padding: 0; font-size: calc(64 * var(--u)); letter-spacing: -0.02em; }
.pl-tvstage .pl-fav-line { min-height: calc(20 * var(--u)); font-size: calc(18 * var(--u)); }
.pl-tvstage .pl-fav-line span { display: inline-block; }
.pl-big {
  margin: 0; max-width: 100%; padding: calc(18 * var(--u)) calc(44 * var(--u)); border-radius: calc(28 * var(--u));
  background: var(--surface); border: calc(3 * var(--u)) solid var(--line-strong);
  font-size: calc(64 * var(--u)); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere;
  transition: background-color 0.45s ease, border-color 0.45s ease, color 0.45s ease, box-shadow 0.45s ease, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.pl-big.long { font-size: calc(46 * var(--u)); max-width: calc(1000 * var(--u)); }
.pl-tvstage.fav .pl-big {
  background: var(--accent); border-color: var(--accent); color: var(--accent-text); transform: scale(1.04);
  box-shadow: 0 0 calc(90 * var(--u)) var(--glow-lamp), 0 0 calc(40 * var(--u)) var(--accent);
}
/* The two halves meet at the middle, under the answer: nothing moves sideways while the votes land. */
.pl-pair { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: calc(56 * var(--u)); align-items: start; }
.pl-side { display: flex; flex-direction: column; gap: calc(12 * var(--u)); min-width: 0; }
.pl-side.writers { align-items: flex-end; text-align: right; }
.pl-side.votes { align-items: flex-start; text-align: left; }
.pl-writers { display: flex; gap: calc(18 * var(--u)); justify-content: flex-end; }
.pl-person { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); }
.pl-writer-critter { width: calc(104 * var(--u)); box-shadow: 0 0 0 calc(4 * var(--u)) var(--background); }
.pl-tvstage.fav .pl-writer-critter { box-shadow: 0 0 0 calc(4 * var(--u)) var(--background), 0 0 0 calc(8 * var(--u)) var(--accent); }
.pl-writers .name-pill { font-size: calc(20 * var(--u)); }
.pl-writers.many .pl-writer-critter { width: calc(80 * var(--u)); }

.pl-count {
  margin: 0; display: flex; align-items: baseline; gap: calc(16 * var(--u));
  font-size: calc(34 * var(--u)); font-weight: 800; letter-spacing: -0.01em;
}
.pl-count.none { font-size: calc(26 * var(--u)); font-weight: 600; color: var(--text-muted); padding-top: calc(24 * var(--u)); }
.pl-pts { font-size: calc(30 * var(--u)); color: var(--accent); }
.pl-voterpills { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: calc(10 * var(--u)); }
.pl-vpill {
  display: flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(5 * var(--u)) calc(16 * var(--u)) calc(5 * var(--u)) calc(5 * var(--u));
  border-radius: 9999px; background: var(--pc); color: var(--background);
}
.pl-vpill-critter { width: calc(46 * var(--u)); }
.pl-vpill-name { font-size: calc(20 * var(--u)); font-weight: 700; max-width: calc(150 * var(--u)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-voterpills.many { gap: calc(8 * var(--u)); }
.pl-voterpills.many .pl-vpill { padding-right: calc(12 * var(--u)); }
.pl-voterpills.many .pl-vpill-critter { width: calc(38 * var(--u)); }
.pl-voterpills.many .pl-vpill-name { font-size: calc(17 * var(--u)); }

/* Along the bottom: the answers by their voting letters, the one on show lifted, the shown ones with their votes. */
.pl-dots { flex-shrink: 0; display: flex; justify-content: center; gap: calc(14 * var(--u)); min-height: calc(64 * var(--u)); align-items: flex-end; }
.pl-dot {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: calc(52 * var(--u)); height: calc(52 * var(--u)); border-radius: 9999px; background: var(--surface); border: calc(2 * var(--u)) solid var(--line-strong);
  transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.5s ease, background-color 0.4s, border-color 0.4s, color 0.4s;
}
.pl-dot-letter { font-family: var(--mono); font-size: calc(22 * var(--u)); font-weight: 500; }
.pl-dot.now { border-color: var(--text); transform: translateY(calc(-8 * var(--u))) scale(1.12); }
.pl-dot.past { opacity: 0.6; }
.pl-dot.lit { background: var(--accent); border-color: var(--accent); color: var(--accent-text); opacity: 1; }
.pl-dot-n {
  position: absolute; right: calc(-8 * var(--u)); top: calc(-8 * var(--u)); min-width: calc(26 * var(--u)); height: calc(26 * var(--u));
  padding: 0 calc(6 * var(--u)); border-radius: 9999px; background: var(--paper); color: var(--background);
  display: flex; align-items: center; justify-content: center; font-size: calc(15 * var(--u)); font-weight: 800;
}
