@font-face {
  font-family: Bricolage;
  src: url('/fonts/title.woff2');
}
@font-face {
  font-family: DM;
  src: url('/fonts/body.woff2');
}
:root {
  --ink: #24243b;
  --blue: #244bbf;
  --paper: #faf6e9;
  --red: #de543f;
  --yellow: #ffcf53;
  --line: #302f43;
  color: var(--ink);
  font-family: DM, system-ui, sans-serif;
  background: var(--paper);
  font-size: 17px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background-image:
    linear-gradient(#334a8c0c 1px, transparent 1px),
    linear-gradient(90deg, #334a8c0c 1px, transparent 1px);
  background-size: 24px 24px;
}
header {
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
nav,
main {
  width: min(1100px, calc(100% - 56px));
  margin: auto;
}
nav {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
a {
  color: var(--blue);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font:
    800 1.5rem Bricolage,
    sans-serif;
  letter-spacing: -0.06em;
  text-decoration: none;
  color: var(--ink);
}
.mark {
  display: grid;
  place-items: center;
  font: 1.8rem Georgia;
  color: var(--ink);
  height: 38px;
  width: 38px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px var(--ink);
  border-radius: 9px;
  transform: rotate(-7deg);
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fffdf7;
  color: var(--ink);
  box-shadow: 2px 3px var(--ink);
}
button:active,
.button:active {
  transform: translate(1px, 2px);
  box-shadow: 0 1px var(--ink);
}
button:hover,
.button:hover {
  filter: brightness(0.97);
}
:focus-visible {
  outline: 3px solid #4179ef;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
.primary {
  background: var(--blue);
  color: white;
}
.rules-link {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 4px;
  font-size: 0.88rem;
}
.rules-link b {
  border: 1.7px solid;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 17px;
}
main {
  padding: clamp(25px, 5vw, 70px) 0 42px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4%;
  align-items: center;
  padding-bottom: clamp(38px, 5vw, 70px);
}
.kicker,
.tag,
.meta,
.eyelabel {
  font:
    800 0.78rem/1.4 DM,
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker {
  color: var(--blue);
}
.tag {
  background: var(--yellow);
  padding: 5px 12px;
  display: inline-block;
  transform: rotate(-3deg);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px var(--ink);
  letter-spacing: 0.095em;
}
h1,
h2,
h3,
.huge,
.code {
  font-family: Bricolage, system-ui, sans-serif;
  letter-spacing: -0.055em;
  line-height: 1.02;
  margin: 0;
}
h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
}
h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
}
h3 {
  font-size: 1.5rem;
}
.hero h1 {
  font-size: clamp(4.6rem, 8.4vw, 7.1rem);
  line-height: 0.83;
  letter-spacing: -0.08em;
  margin: 25px 0 23px;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}
p {
  line-height: 1.5;
  margin: 0.65em 0 1.1em;
}
.lead {
  max-width: 39ch;
  font-size: 1.15rem;
}
.meta {
  margin-top: 20px;
  letter-spacing: 0.045em;
  color: #5d5b67;
  font-size: 0.76rem;
}
.hero-art {
  position: relative;
  padding: 14px 4% 33px;
}
.hero-art img {
  width: 100%;
  display: block;
  border: 2px solid var(--line);
  border-radius: 16px;
  transform: rotate(3deg);
  box-shadow: 6px 7px var(--ink);
}
.guess-slip {
  position: absolute;
  bottom: 0;
  right: 2%;
  background: #ffcaaf;
  border: 2px solid var(--ink);
  padding: 9px 22px;
  transform: rotate(-6deg);
  box-shadow: 3px 4px var(--ink);
  font: italic bold clamp(1.1rem, 2.5vw, 1.8rem) Georgia;
}
.guess-slip small {
  display: block;
  font: 800 0.64rem DM;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.strip,
.panel,
.sheet,
.award {
  background: #fffdf6;
  border: 2px solid var(--line);
  box-shadow: 4px 5px var(--ink);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 36px);
}
.strip {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.strip h2 {
  font-size: 1.8rem;
}
.strip p {
  margin: 5px 0 0;
}
.strip form,
.row,
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.strip input {
  width: 155px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
input,
select {
  min-height: 46px;
  background: white;
  border: 2px solid #696878;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  max-width: 100%;
}
.strip form {
  flex-wrap: nowrap;
}
.join-icon {
  border: 2px solid var(--ink);
  border-radius: 12px;
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  background: #c9ddfb;
  font: bold 2rem Bricolage;
}
.strip .left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.strip .primary {
  background: var(--yellow);
  color: var(--ink);
}
.small {
  font-size: 0.88rem;
}
.muted {
  color: #5d5b67;
}
.roomhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  gap: 10px;
}
.roomhead h1 {
  margin-top: 6px;
}
.chip {
  white-space: nowrap;
  background: #fff7db;
  border: 1.7px solid var(--ink);
  border-radius: 8px;
  padding: 7px 12px;
  font-weight: bold;
}
.grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}
.panel h2,
.sheet h2 {
  margin: 5px 0 14px;
}
.qrwrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.qrwrap canvas {
  width: min(170px, 100%);
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.code {
  font-size: clamp(2.4rem, 4vw, 3.9rem);
  letter-spacing: 0.015em;
}
.roster {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
}
.roster li {
  display: flex;
  align-items: center;
  gap: 11px;
  overflow-wrap: anywhere;
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #ffcf77;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-weight: bold;
}
.roster li:nth-child(3n + 2) .avatar {
  background: #bed7ff;
}
.roster li:nth-child(3n) .avatar {
  background: #ffbaae;
}
.check {
  margin-left: auto;
  color: #255e48;
}
.controls {
  margin-top: 20px;
}
.stack {
  display: grid;
  gap: 14px;
}
.stack label {
  display: grid;
  gap: 6px;
}
.narrow {
  max-width: 610px;
  margin: auto;
}
.sheet {
  max-width: 730px;
  margin: auto;
}
.stage {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px dashed #cccad0;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.drawing {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.editable {
  touch-action: none;
  cursor: crosshair;
}
.toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}
.toolbar button {
  min-height: 38px;
  min-width: 38px;
  padding: 3px 7px;
  box-shadow: none;
}
.swatch {
  background: var(--swatch);
  border-radius: 50%;
  width: 38px;
}
.toolbar [aria-pressed='true'] {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}
.word {
  font: 800 clamp(2rem, 6vw, 4.8rem)/1.1 Bricolage;
  overflow-wrap: anywhere;
  padding: 1em 0.2em;
  margin: 0;
}
.paperword {
  background: #ffe8a1;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  text-align: center;
}
.awardgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.award {
  background: #ffe8a1;
}
.award:nth-child(2n) {
  background: #cbddff;
}
.award h2 {
  overflow-wrap: anywhere;
  font-size: 2rem;
  margin-top: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 10px 4px;
  border-bottom: 1px solid #cccad0;
}
.note {
  margin: 16px 0;
}
.pass {
  margin-top: 16px;
}
.statusbar {
  margin: 14px 0;
  font-weight: bold;
}
.progress {
  height: 13px;
  background: #e1dfd4;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.progress i {
  height: 100%;
  display: block;
  background: var(--yellow);
}
dialog {
  max-width: min(540px, 91vw);
  color: var(--ink);
  padding: 30px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 5px 6px var(--ink);
}
dialog::backdrop {
  background: #24243b80;
}
.close {
  float: right;
  padding: 0;
  width: 42px;
  min-height: 40px;
  font-size: 1.4rem;
}
.guide {
  padding-left: 24px;
}
.guide li {
  padding-left: 5px;
  margin-top: 16px;
  line-height: 1.5;
}
#notice:not(:empty) {
  position: fixed;
  z-index: 5;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
}
.tv .sheet {
  max-width: 850px;
}
.tv .drawing {
  max-height: 52vh;
  object-fit: contain;
}
.tv main {
  padding-top: 3vh;
}
.tv .roomhead {
  margin-bottom: 2vh;
}
.tv .rules-link {
  display: none;
}
.tv .qrwrap canvas {
  width: 210px;
}
.tv .stage {
  margin-bottom: 8px;
}
@media (max-width: 720px) {
  nav,
  main {
    width: calc(100% - 32px);
  }
  nav {
    height: 62px;
  }
  .hero {
    gap: 15px;
  }
  .hero h1 {
    font-size: 4.4rem;
  }
  .lead {
    font-size: 1rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .strip form {
    width: 100%;
  }
  .strip input {
    flex: 1;
    min-width: 0;
  }
  .hero-art {
    padding-left: 0;
    padding-right: 0;
  }
  .meta {
    font-size: 0.68rem;
  }
}
@media (max-width: 520px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 0 2px 30px;
  }
  .hero-art {
    width: 75%;
    max-width: 265px;
    margin: 3px auto 0;
    padding-bottom: 17px;
  }
  .hero h1 {
    font-size: 4.3rem;
    margin: 18px 0 12px;
  }
  .hero h1 br {
    display: none;
  }
  .hero h1 em::before {
    content: ' ';
  }
  .tag {
    font-size: 0.68rem;
  }
  .lead {
    margin-bottom: 14px;
  }
  .meta {
    margin-top: 13px;
  }
  .guess-slip {
    padding: 5px 14px;
  }
  .roomhead {
    align-items: flex-start;
  }
  .roomhead .chip {
    font-size: 0.8rem;
  }
  .join-icon {
    width: 43px;
    height: 43px;
  }
  .strip .left {
    gap: 12px;
  }
  .awardgrid {
    gap: 10px;
  }
  .award {
    padding: 14px;
  }
  .award h2 {
    font-size: 1.4rem;
  }
  .rules-link {
    font-size: 0.8rem;
  }
  .brand {
    font-size: 1.22rem;
  }
  .toolbar {
    gap: 6px;
  }
  .controls button {
    padding: 9px 14px;
  }
}

.hero h1 {
  font-size: clamp(3rem, 6.4vw, 5rem);
  letter-spacing: -0.075em;
}
.hero h1 em::before {
  content: none;
}
@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(2.85rem, 12.5vw, 4rem);
  }
}
.handoff .tag {
  margin: 22px 0 15px;
}
.handoff h2 {
  font-size: clamp(2.5rem, 5vw, 4.7rem);
}
.handoff p {
  max-width: 48ch;
}
.override {
  margin-top: 18px;
  font-size: 0.86rem;
}
.override summary {
  cursor: pointer;
}
.story .clue {
  background: #ffedb6;
  border-left: 4px solid var(--yellow);
  padding: 8px 12px;
}
.guess-pair {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 18px;
}
.prior-draw {
  margin: 0;
}
.prior-draw figcaption {
  margin-top: 5px;
  font-size: 0.86rem;
}
.guess-pair .word {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}
.tv .story .drawing {
  max-height: 42vh;
}
.story p {
  margin: 0.5em 0;
}
.tv .sheet {
  padding: clamp(15px, 2.3vh, 28px);
}
.tv .roomhead h1 {
  font-size: clamp(2rem, 6vh, 4rem);
}
.tv .story h2 {
  font-size: clamp(1.5rem, 4vh, 3rem);
}
@media (max-width: 520px) {
  .guess-pair {
    grid-template-columns: 1fr;
  }
  .prior-draw {
    max-width: 210px;
  }
}
