/* TV Games: bright, chunky, cartoon-party look.
   Everything sits on a colourful background that changes with the game.
   Cards are cream with thick dark outlines and solid drop shadows. */
/* Fonts are bundled with the app (Fredoka and Nunito, SIL Open Font Licence) so it works without internet. */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("/fredoka-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/nunito-latin-800-normal.woff2") format("woff2"); }
:root {
  --ink: #1d1b2e;
  --paper: #fffaf0;
  --sun: #ffd43b;
  --pink: #ff5c8a;
  --green: #17c26b;
  --blue: #2f9bff;
  --purple: #7b4dff;
  --orange: #ff9f1c;
  --red: #ff4d4d;
  --teal: #12b5a6;
  --onbg: var(--ink);
  --bg: var(--purple);
  --edge: 3px;
  --drop: 0 5px 0 var(--ink);
  --display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body[data-theme="charades"] { --bg: var(--pink); }
body[data-theme="sketch"] { --bg: var(--blue); }
body[data-theme="describe"] { --bg: var(--orange); }
body[data-theme="hum"] { --bg: var(--teal); }
body[data-theme="scale"] { --bg: #e84fb0; }
body[data-theme="categories"] { --bg: #8ac926; }
body[data-theme="wolves"] { --bg: #2b2d6e; --onbg: #fff; }
body[data-theme="micro"] { --bg: #ef4444; }
body[data-theme="seabattle"] { --bg: #0a6aa1; --onbg: #fff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 17px; }
html.is-tv { font-size: 1.55vw; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  line-height: 1.35;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.22) 0 4rem, transparent 4.05rem),
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.16) 0 6rem, transparent 6.05rem),
    radial-gradient(rgba(255, 255, 255, 0.2) 0.16rem, transparent 0.18rem);
  background-size: auto, auto, 1.9rem 1.9rem;
  background-attachment: fixed;
  transition: background-color 0.4s;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, p, ol, ul { margin: 0; }
h1, h2, .logo, button, .eyebrow, label, .badge, .timer, .bigcode { font-family: var(--display); }
h1, h2 { font-weight: 700; line-height: 1.1; }
b { font-weight: 800; }
em { font-style: normal; }
.code { font-family: var(--display); font-weight: 700; letter-spacing: 0.14em; }
.eyebrow { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); opacity: 0.85; }
.wait, .small { font-size: 0.92rem; text-align: center; }
.small { text-align: left; opacity: 0.75; }

/* ---------- Building blocks ---------- */
.logo {
  font-size: 3rem; font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
  transform: rotate(-2deg);
}
.card, .panel, .qrcard, .upnext {
  background: var(--paper); border: var(--edge) solid var(--ink); border-radius: 1.3rem; box-shadow: var(--drop);
}
.card { padding: 1.1rem; display: grid; gap: 0.75rem; }
.card h2 { font-size: 1.45rem; }
.card label { font-size: 1.2rem; font-weight: 600; }
.notice { background: var(--ink); color: #fff; border-radius: 99px; padding: 0.5rem 1rem; text-align: center; font-size: 0.95rem; }
.pill { justify-self: start; align-self: flex-start; background: var(--sun); border: var(--edge) solid var(--ink); font-weight: 800; padding: 0.15rem 0.9rem; border-radius: 99px; }
.off { opacity: 0.4; }

input {
  font: inherit; font-size: 1.2rem; color: var(--ink); width: 100%;
  background: #fff; border: var(--edge) solid var(--ink); border-radius: 0.9rem; padding: 0.75rem 0.9rem;
}
input:focus { outline: 4px solid var(--sun); }
button, .link {
  font-family: var(--display); font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; text-align: center;
  display: block; width: 100%; border: var(--edge) solid var(--ink); border-radius: 1rem; box-shadow: var(--drop);
  transition: transform 0.06s, box-shadow 0.06s;
}
button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
button:disabled { opacity: 0.45; cursor: default; }
.primary { background: var(--sun); font-size: 1.25rem; padding: 0.9rem 1rem; }
.ghost { background: #fff; padding: 0.65rem 1rem; }
.quiet { background: transparent; border: 0; box-shadow: none; text-decoration: underline; font-family: var(--body); font-size: 0.85rem; opacity: 0.8; margin-top: 1rem; }
.x { width: 2rem; height: 2rem; padding: 0; border-radius: 50%; background: #fff; box-shadow: none; font-size: 1.1rem; line-height: 1; flex: none; }

.av {
  display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; flex: none;
  border: 0.14em solid var(--ink); border-radius: 50%; font-size: 0.95em; line-height: 1; background: var(--sun);
}
.av1 { background: #9be564; } .av2 { background: #cfd8ff; } .av3 { background: #ffb3e6; }
.av4 { background: #ff9d9d; } .av5 { background: #ffb84d; } .av6 { background: #8fd6ff; } .av7 { background: #fff27a; }
.who { display: inline-flex; align-items: center; gap: 0.45em; min-width: 0; }
.who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timer {
  width: 3.4rem; height: 3.4rem; flex: none; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
  background: #fff; border: var(--edge) solid var(--ink); border-radius: 50%; box-shadow: var(--drop);
}
.timer.hot { background: var(--red); color: #fff; animation: pulse 0.5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

.scores { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.score { display: inline-flex; align-items: center; gap: 0.35em; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; padding: 0.15rem 0.75rem 0.15rem 0.2rem; font-size: 0.9rem; }
.score i { font-style: normal; color: #0a8f4c; font-weight: 800; }

.board { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.board li { display: flex; align-items: center; gap: 0.6rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.9rem; padding: 0.4rem 0.8rem; }
.board li.top { background: var(--sun); }
.board .rank { font-family: var(--display); width: 1.2em; text-align: center; }
.board .who { flex: 1; }
.board .gain { color: #0a8f4c; font-weight: 800; }
.board b { font-family: var(--display); font-size: 1.2em; min-width: 1.5em; text-align: right; }

.got { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.got li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.8rem; padding: 0.35rem 0.7rem; }
.got li.no { opacity: 0.6; }
.got em { font-size: 0.85em; white-space: nowrap; }

/* ---------- Phone ---------- */
.phone { max-width: 30rem; margin: 0 auto; padding: 1rem 1rem 3rem; display: grid; gap: 0.95rem; }
.home { padding-top: 2.2rem; }
.home .logo { text-align: center; margin-bottom: 0.3rem; }
.lead { text-align: center; font-size: 1.1rem; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.lead .code { font-size: 1.3em; }
.bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.9rem; background: var(--paper); border: var(--edge) solid var(--ink); border-radius: 99px; font-size: 0.95rem; }
.bar .me { flex: 1; display: flex; align-items: center; gap: 0.4em; min-width: 0; white-space: nowrap; overflow: hidden; }
.bar em, .people em, .slot em { font-family: var(--display); font-size: 0.72em; background: var(--ink); color: #fff; border-radius: 99px; padding: 0.1em 0.6em; text-transform: uppercase; letter-spacing: 0.05em; }
.row { display: flex; gap: 0.6rem; }
.row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.2em; text-align: center; font-family: var(--display); }
.row .primary { width: auto; padding-inline: 1.4rem; }
.row-top { display: flex; align-items: center; gap: 0.9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.game { background: #fff; padding: 0.8rem 0.9rem; text-align: left; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.2rem 0.6rem; }
.game .icon { font-size: 1.7rem; }
.game b { font-size: 1.25rem; font-weight: 700; }
.game small { font-family: var(--body); font-size: 0.8rem; opacity: 0.7; }
.game .blurb { grid-column: 1 / -1; font-family: var(--body); font-size: 0.9rem; font-weight: 700; opacity: 0.8; }
.game.on.g-charades, .upnext.g-charades { background: #ffd0dd; }
.game.on.g-sketch, .upnext.g-sketch { background: #cfe6ff; }
.game.on.g-describe, .upnext.g-describe { background: #ffe2b8; }
.game.on.g-hum, .upnext.g-hum { background: #c6f3ec; }
.game.on.g-scale, .upnext.g-scale { background: #ffd3ee; }
.game.on.g-categories, .upnext.g-categories { background: #e1f5b8; }
.game.on.g-wolves, .upnext.g-wolves { background: #d5d7ff; }
.game.on.g-micro, .upnext.g-micro { background: #ffd0d0; }
.game.on.g-seabattle, .upnext.g-seabattle { background: #c8e9fb; }
.game.on { outline: 4px solid var(--sun); outline-offset: 2px; }
.pickme { background: #fff; padding: 0.6rem 0.8rem; text-align: left; font-size: 1.1rem; }
.pickme.on { background: var(--sun); }
/* While you are performing: no top bar, a compact prompt, and big name buttons that are easy to hit. */
.phone.performing { padding-top: 0.6rem; gap: 0.7rem; }
.performing .bar { display: none; }
.performing .prompt { padding: 0.8rem; gap: 0.3rem; }
.performing .prompt h2 { font-size: 1.9rem; }
.performing > .eyebrow { color: #fff; opacity: 1; text-shadow: 1px 1px 0 var(--ink); }
.whogot { display: grid; gap: 0.7rem; min-width: 0; }
.whogot .pickme { min-width: 0; }
.whogot .who > span:last-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.1; text-align: left; }
.card > * { min-width: 0; }
.card .whogot.two .pickme { font-size: 0.95rem; padding: 0.55rem 0.45rem; }
.card .whogot.two .who { gap: 0.35em; }
.card .whogot.two .av { font-size: 0.85em; }
.whogot.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pickme.big { min-height: 4.3rem; font-size: 1.3rem; min-width: 0; padding: 0.6rem 0.7rem; display: flex; align-items: center; }
.pickme.big .av { font-size: 1.2em; }
.whogot.two .pickme.big { font-size: 1.1rem; padding-inline: 0.5rem; }
.whogot.two .pickme.big .av { font-size: 1em; }
.pickme.big .who > span:last-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.1; text-align: left; }
/* Text that sits straight on the coloured background follows the theme (white on the dark Wolves theme). */
.phone > .eyebrow, .phone > .wait, .row-top > .eyebrow, .stage > .eyebrow, .quiet { color: var(--onbg); }
.ban { font-size: 0.95rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.7rem; padding: 0.3rem 0.5rem; }
.ban b { display: inline-block; background: var(--red); color: #fff; border-radius: 99px; padding: 0 0.6em; margin: 0.1rem; }

/* Where on the Scale */
.scalebar { display: grid; gap: 0.4rem; width: 100%; }
.track { position: relative; height: 3.4rem; border: var(--edge) solid var(--ink); border-radius: 99px; overflow: hidden; background: linear-gradient(90deg, #cfe6ff, #fff 50%, #ffd0dd); }
.zone { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); }
.zone.z1 { width: 56%; background: #ffe9a8; } .zone.z2 { width: 36%; background: #ffc94d; } .zone.z3 { width: 20%; background: #ff8a3d; } .zone.z4 { width: 8%; background: var(--red); }
.mark { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 1.05rem; }
.ends { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--display); font-size: 1rem; }
.ends b:last-child { text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 3.4rem; padding: 0; border: 0; background: transparent; }
input[type="range"]:focus { outline: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 1rem; background: linear-gradient(90deg, #cfe6ff, #fff 50%, #ffd0dd); border: 3px solid var(--ink); border-radius: 99px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 2.8rem; height: 2.8rem; margin-top: -1.05rem; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); }
input[type="range"]::-moz-range-track { height: 1rem; background: linear-gradient(90deg, #cfe6ff, #fff 50%, #ffd0dd); border: 3px solid var(--ink); border-radius: 99px; }
input[type="range"]::-moz-range-thumb { width: 2.6rem; height: 2.6rem; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; }
.stage.wide .scalebar { width: 80%; }
.tv .track { height: 5rem; border-width: 0.2rem; }
.tv .mark { font-size: 1.7rem; }
.tv .ends { font-size: 1.6rem; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.chipname { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; padding: 0.2rem 0.8rem 0.2rem 0.25rem; opacity: 0.5; font-size: 1rem; }
.chipname.done { opacity: 1; }
.chipname.dead { opacity: 1; background: #d9d9e3; text-decoration: line-through; }
.chipname em { text-decoration: none; display: inline-block; font-size: 0.8em; }

/* Categories */
.bigletter { font-family: var(--display); font-size: 2.6rem; line-height: 1; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; background: var(--sun); border: var(--edge) solid var(--ink); border-radius: 0.9rem; box-shadow: var(--drop); flex: none; }
#catform label { font-size: 1rem; margin-bottom: -0.5rem; }
#catform input { font-size: 1.05rem; padding: 0.55rem 0.8rem; }
.answers { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.answers li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.1rem 0.5rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.8rem; padding: 0.4rem 0.6rem; }
.answers .who { font-size: 0.8rem; opacity: 0.75; }
.answers .ans { grid-column: 1; font-family: var(--display); font-size: 1.15rem; }
.answers em { grid-column: 1; font-size: 0.8rem; color: #0a8f4c; font-weight: 800; }
.answers li:not(.ok) { background: #ececf2; }
.answers li:not(.ok) .ans { text-decoration: line-through; opacity: 0.6; }
.answers li:not(.ok) em { color: #b3261e; }
.thumb { grid-column: 2; grid-row: 1 / span 3; width: 2.8rem; height: 2.8rem; padding: 0; border-radius: 50%; background: #fff; font-size: 1.2rem; box-shadow: 0 3px 0 var(--ink); }
.thumb.on { background: var(--red); }
.hugeletter { font-family: var(--display); font-size: 9rem; line-height: 1; width: 12rem; height: 12rem; display: grid; place-items: center; background: var(--sun); border: 0.3rem solid var(--ink); border-radius: 2rem; box-shadow: 0 0.6rem 0 var(--ink); transform: rotate(-3deg); }
.tv-game.even .stage .timer { width: 5rem; height: 5rem; font-size: 2.2rem; }
.order.plain { list-style: decimal inside; font-size: 1.15rem; }
ol.order.plain li { display: list-item; }
ol.order.plain li::before { content: none; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; width: 100%; }
.anscard { background: var(--paper); border: 0.16rem solid var(--ink); border-radius: 1rem; box-shadow: 0 0.3rem 0 var(--ink); padding: 0.7rem 0.5rem; display: grid; justify-items: center; gap: 0.2rem; }
.anscard b { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; overflow-wrap: anywhere; }
.anscard small { font-size: 0.8rem; }
.anscard:not(.ok) { background: #d9d9e3; }
.anscard:not(.ok) b { text-decoration: line-through; opacity: 0.6; }
.anscard.ok small { color: #0a8f4c; font-weight: 800; }

/* Wolves */
.wolfcard { background: #c9ccff; }
.role.wolfcard { background: #ffb3b3; }
.chat { display: grid; gap: 0.25rem; max-height: 9rem; overflow-y: auto; }
.chat p { background: #fff; border: 2px solid var(--ink); border-radius: 0.7rem 0.7rem 0.7rem 0; padding: 0.2rem 0.6rem; justify-self: start; font-size: 0.95rem; }
#wolfchat input { text-transform: none; letter-spacing: 0; text-align: left; font-family: var(--body); font-size: 1rem; }
.ghost.picked { background: var(--sun); }
.hugeicon { font-size: 6rem; line-height: 1; }
.news { background: var(--paper); color: var(--ink) !important; text-shadow: none !important; border: var(--edge) solid var(--ink); border-radius: 1rem; padding: 0.5rem 1.2rem; }
.stage .chips { max-width: 80%; }

/* Daft Dash */
#microcanvas { display: block; width: 100%; touch-action: none; }
.bounce { animation: bob 0.5s ease-in-out infinite alternate; }
.race { display: grid; gap: 0.6rem; }
.lane { display: grid; grid-template-columns: 9rem 1fr 7rem; align-items: center; gap: 0.6rem; font-size: 1rem; }
.lane b { text-align: right; font-family: var(--display); }
.meter { height: 1.4rem; background: #fff; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--sun); transition: width 0.2s; }

/* Sea Battle */
.seagrid { display: grid; gap: 3px; background: var(--ink); border: var(--edge) solid var(--ink); border-radius: 0.8rem; overflow: hidden; font-size: 1rem; }
.seagrid.place { touch-action: none; user-select: none; -webkit-user-select: none; }
.lab { background: var(--ink); color: #fff; font: 700 0.75em var(--display); font-style: normal; display: grid; place-items: center; }
.sq { position: relative; isolation: isolate; aspect-ratio: 1; width: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; background: #7fd0f5; }
button.sq.sea:active { background: var(--sun); transform: none; box-shadow: none; }
.sq.miss { background: #d6effb; color: #5b7c8d; font-size: 1.6rem; }
.sq.hit { background: var(--orange); }
/* A ship is a grey hull drawn across its squares, pointed at the front and rounded at the back. */
.sq.ship::before { content: ''; position: absolute; z-index: -1; background: #7d8296; border: 2px solid var(--ink); }
.sq.ship.h::before { inset: 16% -3px; border-left: 0; border-right: 0; }
.sq.ship.v::before { inset: -3px 16%; border-top: 0; border-bottom: 0; }
.sq.ship.h.bow::before { left: 8%; border-left: 2px solid var(--ink); border-radius: 60% 0 0 60%; }
.sq.ship.h.stern::before { right: 10%; border-right: 2px solid var(--ink); border-radius: 0 25% 25% 0; }
.sq.ship.v.bow::before { top: 8%; border-top: 2px solid var(--ink); border-radius: 60% 60% 0 0; }
.sq.ship.v.stern::before { bottom: 10%; border-bottom: 2px solid var(--ink); border-radius: 0 0 25% 25%; }
.sq.ship.h.bow.stern::before, .sq.ship.v.bow.stern::before { border-radius: 40%; }
.sq.ship::after { content: ''; position: absolute; z-index: -1; width: 22%; height: 22%; border-radius: 50%; background: #c9cddd; border: 2px solid var(--ink); }
.sq.ship.sel::before { background: var(--sun); }
.sq.ship.sunk::before { background: #3c3c46; }
.sq.ship.sunk::after { display: none; }
.sq.drop { background: #b9f5c0; }
.sq.last { outline: 3px solid var(--sun); outline-offset: -3px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.seagrid.small { max-width: 60%; margin-inline: auto; }
.seagrid.small .sq { font-size: 0.7rem; }
.seas { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; min-height: 0; align-items: start; }
.seaside { display: grid; gap: 0.5rem; justify-items: center; opacity: 0.75; }
.seaside.target { opacity: 1; }
.seaside h2 { margin: 0; color: #fff; text-shadow: 0.1rem 0.1rem 0 var(--ink); display: flex; align-items: center; gap: 0.6rem; font-size: 1.5rem; }
.seaside h2 small { font-size: 0.55em; font-family: var(--body); }
.seaside .seagrid { width: min(100%, 18.5rem); }
.tv .sq { font-size: 1.5rem; }
.seanews { align-self: center; }

.awake { position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; opacity: 0.01; pointer-events: none; }

.people { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.people li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.6rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.9rem; }
.people .tags { flex: 1; display: flex; gap: 0.3rem; }

.role { text-align: center; background: var(--sun); }
.role h2 { font-size: 2.2rem; }
.role.good { background: #9be564; }

  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 0.7rem; box-shadow: 0 3px 0 var(--ink);
  min-height: 3.6rem; padding: 0.25rem; display: grid; place-items: center; text-align: center;
  font-family: var(--body); font-size: 0.8rem; font-weight: 800; line-height: 1.15; width: auto;
}

.card.minor { background: rgba(255, 250, 240, 0.85); box-shadow: none; font-size: 0.9rem; }
/* While you are drawing, everything else shrinks so the canvas gets as much of the screen as possible. */
.phone.drawing { padding: 0.5rem 0.5rem 1rem; gap: 0.5rem; }
.drawing .bar { display: none; }
.drawing .pad { margin-inline: 0; box-shadow: 0 3px 0 var(--ink); }
.drawing .row-top .timer { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; box-shadow: 0 3px 0 var(--ink); }
.drawing .tools button { box-shadow: 0 3px 0 var(--ink); }
.drawing .swatch, .drawing .size { height: 2.3rem; }
.drawing .tool { padding: 0.35rem 0.5rem; }
.drawing .quiet { margin-top: 1.2rem; }
.drawword small { display: block; font-size: 0.75em; }
.opts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.opts span { font-family: var(--display); margin-right: 0.2rem; }
.opt { width: auto; background: #fff; padding: 0.3rem 0.8rem; border-radius: 99px; box-shadow: 0 3px 0 var(--ink); font-size: 0.95rem; }
.opt.on { background: var(--sun); }
.upnext h2 small { font-size: 0.5em; background: var(--ink); color: #fff; border-radius: 99px; padding: 0.15em 0.7em; vertical-align: middle; }
.drawword { font-size: 1.2rem; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.pad, .easel { background: #fff; border: var(--edge) solid var(--ink); border-radius: 1.2rem; box-shadow: var(--drop); overflow: hidden; }
.pad { margin-inline: -0.5rem; }
.pad canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.tools { display: flex; gap: 0.5rem; align-items: center; }
.swatch { flex: 1; height: 2.6rem; padding: 0; border-radius: 0.8rem; }
.swatch.on, .size.on { outline: 4px solid #fff; outline-offset: 1px; }
.size { width: 3rem; height: 2.8rem; padding: 0; background: #fff; display: grid; place-items: center; flex: none; }
.size i { background: var(--ink); border-radius: 50%; display: block; }
.tool { background: #fff; padding: 0.65rem 0.5rem; }

/* ---------- Big screen (sizes follow the screen width) ---------- */
.tv { height: 100vh; padding: 1.2rem 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; overflow: hidden; position: relative; }
.tv h1 { font-size: 3rem; color: #fff; text-shadow: 0.12rem 0.12rem 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.tv h2 { font-size: 1.9rem; }
.tv p { font-size: 1.05rem; }
.tv .small { font-size: 0.85rem; }
.tv .eyebrow { font-size: 0.85rem; }
.tv .logo { font-size: 4rem; }
.tv-offline { position: absolute; top: 0.6rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.2rem 1rem; border-radius: 99px; }

.tv-lobby { flex: 1; display: grid; grid-template-columns: 0.85fr 1.35fr; gap: 2rem; align-items: center; }
.join { display: grid; gap: 1.2rem; justify-items: center; text-align: center; }
.qrcard { padding: 1.1rem 1.4rem 0.8rem; display: grid; gap: 0.3rem; justify-items: center; transform: rotate(1.5deg); }
.qr { width: 13rem; height: 13rem; }
.tv .bigcode { font-size: 4.2rem; font-weight: 700; letter-spacing: 0.16em; line-height: 1; margin-right: -0.16em; }
.roster { display: grid; gap: 0.9rem; }
.roster > .eyebrow { color: #fff; opacity: 1; text-shadow: 1px 1px 0 var(--ink); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.slot {
  min-height: 6.2rem; border: 0.16rem dashed rgba(29, 27, 46, 0.45); border-radius: 1.1rem; background: rgba(255, 255, 255, 0.18);
  display: grid; place-content: center; justify-items: center; gap: 0.2rem; text-align: center; font-family: var(--display); font-size: 1.6rem; color: rgba(29, 27, 46, 0.45);
}
.slot.in { background: var(--paper); border: 0.16rem solid var(--ink); box-shadow: 0 0.3rem 0 var(--ink); color: var(--ink); font-size: 1.1rem; font-weight: 600; animation: pop 0.35s; }
.slot.in:nth-child(odd) { transform: rotate(-1.5deg); }
.slot.in:nth-child(even) { transform: rotate(1.5deg); }
.slot .av { font-size: 1.4rem; }
.slot b { font-size: 0.9rem; }
@keyframes pop { from { transform: scale(0.5); } }
.upnext { padding: 1.1rem 1.4rem; display: flex; gap: 1.2rem; align-items: center; }
.upnext .icon { font-size: 4rem; }
.upnext div { display: grid; gap: 0.3rem; }

.tv-head { display: flex; gap: 1.2rem; align-items: center; font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.badge { background: var(--paper); border: var(--edge) solid var(--ink); border-radius: 99px; padding: 0.15rem 1rem; box-shadow: 0 0.2rem 0 var(--ink); }
.tv-head .grow { flex: 1; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.tv-head .code { background: var(--ink); color: #fff; border-radius: 99px; padding: 0.15rem 0.9rem; }

.tv-game { flex: 1; display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.3rem; min-height: 0; }
.tv-game.even { grid-template-columns: 1fr 1fr; align-items: center; }
.panel { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; min-height: 0; overflow: hidden; }
.panel .timer { align-self: flex-end; margin-bottom: -3.2rem; }
.order { margin: 0; padding-left: 0; list-style-position: inside; font-family: var(--display); font-size: 1.2rem; font-weight: 600; display: grid; gap: 0.3rem; }
.order li { display: flex; align-items: center; gap: 0.5rem; }
ol.order { counter-reset: n; }
ol.order li::before { counter-increment: n; content: counter(n); width: 1.2em; text-align: center; }
.order.ticks { list-style: none; }
.order.ticks li { opacity: 0.45; }
.order.ticks li.done { opacity: 1; }
.order.ticks li.done::after { content: "✓"; color: #0a8f4c; font-size: 1.3em; }
.tv .pill { font-size: 1.2rem; }
.tv .scores { gap: 0.6rem; padding-right: 4.5rem; }
.tv .score { font-size: 1rem; }
.tv .got li { font-size: 1rem; }

.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem; text-align: center; min-height: 0; }
.stage > p { color: #fff; text-shadow: 1px 1px 0 var(--ink); font-size: 1.3rem; }
.stage > .eyebrow { opacity: 1; font-size: 1.1rem; }
.stage .timer { width: 9rem; height: 9rem; font-size: 4.5rem; border-width: 0.3rem; box-shadow: 0 0.5rem 0 var(--ink); }
.bigface .av { font-size: 4rem; border-width: 0.08em; box-shadow: 0 0.4rem 0 var(--ink); animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-0.5rem) rotate(4deg); } }
.stage .chip { background: var(--paper); color: var(--ink); text-shadow: none; border: var(--edge) solid var(--ink); border-radius: 99px; padding: 0.2rem 1.2rem; }
.stage .stars { font-size: 2rem; min-height: 2.8rem; }
.stage .board { width: 26rem; font-size: 1.05rem; gap: 0.3rem; }
.stage .board li { padding: 0.22rem 0.8rem; }

.easel { display: grid; place-items: center; min-height: 0; }
.easel { position: relative; }
.easel canvas { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 100%; }
.answer { font-size: 2.6rem !important; }
.feed { margin-top: auto; display: grid; gap: 0.2rem; }
.feed p { font-size: 0.95rem; background: #fff; border: 2px solid var(--ink); border-radius: 0.7rem 0.7rem 0.7rem 0; padding: 0.15rem 0.6rem; justify-self: start; }

.sound { position: absolute; right: 1.8rem; bottom: 1rem; width: auto; padding: 0.15rem 0.8rem; background: var(--paper); font-size: 0.9rem; border-radius: 99px; box-shadow: 0 0.2rem 0 var(--ink); }
.fx { position: fixed; bottom: -6rem; z-index: 5; font-size: 5rem; line-height: 1; text-align: center; pointer-events: none; transform: translateX(-50%); animation: floatUp 2.6s ease-out forwards; }
.fx small { display: block; margin-top: 0.3rem; font-family: var(--display); font-size: 1.1rem; font-weight: 600; background: var(--ink); color: #fff; border-radius: 99px; padding: 0.1em 0.8em; white-space: nowrap; }
@keyframes floatUp {
  15% { transform: translateX(-50%) translateY(-22vh) rotate(var(--tilt)) scale(1.25); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-85vh) rotate(calc(var(--tilt) * -1)); opacity: 0; }
}
.sfx { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem; margin-top: 0.6rem; }
.sfx.inline span { color: var(--ink); text-shadow: none; font-weight: 800; }
.sfx span { flex: 1 1 100%; min-width: 0; font-size: 0.85rem; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.sfx button { width: 2.3rem; height: 2.3rem; padding: 0; border-radius: 50%; background: var(--paper); font-size: 1.3rem; box-shadow: 0 3px 0 var(--ink); flex: none; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -2rem; left: calc(var(--i) * 5.6%); width: 0.8rem; height: 1.3rem; border: 2px solid var(--ink); border-radius: 0.2rem;
  background: var(--sun); animation: fall calc(2.6s + var(--i) * 0.13s) linear calc(var(--i) * -0.37s) infinite;
}
.confetti i:nth-child(3n) { background: var(--pink); }
.confetti i:nth-child(3n + 1) { background: var(--orange); border-radius: 50%; height: 0.9rem; }
.confetti i:nth-child(4n) { background: #fff; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .confetti, .bigface .av, .timer.hot { animation: none; } .confetti { display: none; } }

/* Games that need more players than are here */
.game.locked { opacity: 0.45; filter: grayscale(1); }
.pill.how, .chip { display: inline-block; background: var(--ink); color: #fff; border-radius: 99px; padding: 0.25em 0.9em; font-family: var(--display); font-weight: 600; }

/* A word that bursts onto the screen */
.shout { position: fixed; inset: 0; z-index: 9; display: grid; place-content: center; justify-items: center; gap: 0.5rem; pointer-events: none; text-align: center; animation: shoutIn 1.4s ease-out forwards; }
.shout b { font: 700 2rem var(--display); color: #fff; background: var(--ink); border-radius: 99px; padding: 0.15em 0.9em; }
.shout span { font-size: 5rem; line-height: 1; }
.shout.quick b { font-size: 1.4rem; }
.shout.quick span { font-size: 3.5rem; }
.shout.big { animation-duration: 3s; background: rgba(0, 0, 0, 0.35); }
.shout.big b { font-size: 9rem; background: var(--orange); border: 0.5rem solid var(--ink); transform: rotate(-4deg); }
.shout.big span { font-size: 7rem; animation: judder 0.12s linear infinite alternate; }
.shout.sink { animation-duration: 3s; background: rgba(10, 60, 100, 0.55); }
.shout.sink span { font-size: 7rem; animation: goDown 2.8s ease-in forwards; }
.shout.cheer { animation-duration: 2s; }
.shout.cheer span { animation: pulse 0.3s ease-in-out infinite alternate; }
@keyframes shoutIn { 0% { opacity: 0; transform: scale(0.4); } 12% { opacity: 1; transform: scale(1.1); } 20% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes judder { to { transform: translate(0.4rem, -0.3rem) rotate(3deg); } }
@keyframes goDown { 20% { transform: rotate(-12deg); } 100% { transform: translateY(45vh) rotate(-55deg); opacity: 0.2; } }
