@font-face {
  font-family: Bricolage;
  src: url("./bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #262824;
  --blue: #2b48bf;
  --blue-dark: #20399c;
  --paper: #f7f6ef;
  --card: #fffefa;
  --line: #cbcbbf;
  --muted: #62645c;
  --yellow: #f3cb59;
  --type: Bricolage, "Trebuchet MS", Arial, sans-serif;
  font: 100%/1.45 var(--type);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, select, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #c2761a; outline-offset: 3px; }
button:disabled { opacity: .48; }
button:not(:disabled) { transition: background-color .14s, box-shadow .14s, transform .14s; }
button:not(:disabled):active { transform: translateY(1px); }
h1, h2, p, figure, dl, ol { margin: 0; }
.masthead { border-bottom: 1px solid #cecec2; background: var(--paper); }
.mast-inner, .page, footer { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.mast-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand, .help-button, .replay, .subtle, .secondary, .primary, footer > div { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.brand { font-size: 1.375rem; font-weight: 800; letter-spacing: -.04em; gap: 12px; }
#brand-mark { width: 38px; height: 38px; transform: rotate(-6deg); }
.help-button, .subtle, .replay, .text-btn { border: 0; background: transparent; font-weight: 650; }
.help-button { font-size: .94rem; gap: 7px; padding: 8px 0 8px 8px; }
.help-mark { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid; border-radius: 50%; font-size: .78rem; font-weight: 800; line-height: 1; }
.help-button:hover, .text-btn:hover, .replay:hover { color: var(--blue); }
.page { flex: 1 0 auto; padding-bottom: 60px; }
.intro { display: grid; grid-template-columns: 1.17fr .9fr; align-items: center; gap: 54px; padding: 48px 0 36px; }
h1, h2 { line-height: 1.06; }
.intro h1 { font-size: clamp(4.1rem, 7.8vw, 6.7rem); font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.underlined { display: inline-block; color: var(--blue); position: relative; isolation: isolate; }
.underlined::after { content: ""; z-index: -1; position: absolute; left: 1%; right: -2%; height: .105em; bottom: .02em; background: var(--yellow); border-radius: 50% 25% 45% 28%; transform: rotate(-3deg); }
.intro p { font-size: clamp(1.02rem, 1.4vw, 1.23rem); max-width: 34ch; line-height: 1.46; color: #4a4c44; }
.home-grid, .room-grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .88fr); gap: 38px; align-items: start; }
.sample-card, .setup-card, .side-card, .drawing-card, .invite-sheet { background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; }
.sample-card { align-self: stretch; display: flex; flex-direction: column; margin: 6px 2px 4px 4px; transform: rotate(-1.4deg); position: relative; box-shadow: 4px 5px 0 #d7d6c8; }
.paper-tape { z-index: 1; width: 88px; height: 27px; position: absolute; top: -14px; left: 43%; transform: rotate(5deg); background: repeating-linear-gradient(95deg,#efd37eaa 0 2px,#f6dc8ec7 2px 5px); clip-path: polygon(1% 3%,98% 0,100% 14%,98% 24%,100% 39%,98% 53%,100% 65%,98% 80%,100% 96%,2% 100%,0 82%,2% 66%,0 51%,2% 37%,0 22%); }
.sample-paper, #board, .invite-sheet { background-color: #fffef8; background-image: radial-gradient(#d9d8ca 1px, transparent 1.1px); background-size: 16px 16px; background-position: 7px 7px; }
.sample-paper { position: relative; min-height: 285px; flex: 1; border-radius: 9px 9px 0 0; overflow: hidden; }
.sketch-label { position: absolute; top: 18px; left: 21px; font: 600 .82rem var(--type); display: flex; align-items: center; gap: 7px; color: #56584e; }
.tiny-cross { color: var(--blue); font-size: 1.34rem; line-height: 1; }
#sample-art { width: 100%; height: calc(100% - 35px); position: absolute; inset: 34px 0 0; object-fit: contain; }
figcaption { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 19px 24px; border-top: 1px solid var(--ink); }
.micro { font: 600 .77rem/1.35 "Courier New", monospace; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
figcaption h2 { margin-top: 3px; font-size: clamp(1.22rem,2vw,1.62rem); letter-spacing: -.035em; font-weight: 750; }
.replay { padding: 9px 4px; font-size: .9rem; }
.icon { width: 18px; height: 18px; display: inline-flex; flex: 0 0 auto; vertical-align: middle; }
.icon canvas { width: 100%; height: 100%; }
.setup-card, .side-card { box-shadow: 3px 4px 0 #deded1; overflow: hidden; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ink); }
.tabs button { padding: 17px 6px 15px; display: flex; justify-content: center; align-items: center; gap: 8px; border: 0; background: #f4f3ec; font-weight: 700; position: relative; color: var(--muted); }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button[aria-selected=true] { color: var(--blue); background: #eff1fc; }
.tabs button[aria-selected=true]::after { content: ""; height: 3px; background: var(--blue); position: absolute; bottom: -1px; left: 0; right: 0; }
.tabs button:focus-visible { outline-offset: -4px; }
.setup-form { padding: 23px 26px 19px; }
label, .field-label { display: block; font-size: .94rem; font-weight: 700; margin-bottom: 7px; }
input, select, .stepper { width: 100%; min-height: 46px; border: 1px solid #a9ada1; border-radius: 6px; background: #fffefa; }
input, select { padding: 10px 13px; }
input::placeholder { color: #73756c; }
.fields-row { display: grid; grid-template-columns: 1fr 1.08fr; gap: 17px; margin: 17px 0; }
.fields-row > div, .select-wrap { min-width: 0; }
.stepper { display: flex; justify-content: space-between; align-items: stretch; overflow: hidden; }
.stepper button { border: 0; background: transparent; min-width: 37px; font-size: 1.22rem; line-height: 1; }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper button:not(:disabled):hover { background: #eeefe7; }
.stepper output { align-self: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; height: 7px; width: 7px; top: calc(50% - 6px); right: 16px; border-bottom: 1.7px solid; border-right: 1.7px solid; transform: rotate(45deg); pointer-events: none; }
select { appearance: none; padding-right: 33px; cursor: pointer; }
.deck-wrap .icon { pointer-events: none; position: absolute; top: 14px; left: 13px; color: var(--blue); }
.deck-wrap select { padding-left: 41px; }
.primary, .secondary { border: 1.5px solid var(--ink); border-radius: 6px; padding: 11px 16px; min-height: 44px; font-weight: 750; font-size: 1rem; line-height: 1.2; }
.primary { background: var(--blue); border-color: #243783; color: white; box-shadow: 0 3px 0 #20317b; }
.primary:not(:disabled):hover { background: var(--blue-dark); }
.secondary { background: var(--card); }
.secondary:not(:disabled):hover, .subtle:hover { background: #eeeee6; }
.wide { width: 100%; }
.setup-form > .primary { margin-top: 22px; min-height: 47px; }
.form-hint, .board-help, .keyboard-note { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.form-hint { text-align: center; margin: 13px 0 0; }
#join-fields { margin-top: 18px; }
.code-input { letter-spacing: .17em; text-transform: uppercase; font-family: "Courier New", monospace; font-weight: 700; }
.error { margin: 14px 0 0; color: #9a3024; font-size: .94rem; }
footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-block: 19px 24px; font-size: .82rem; color: var(--muted); }
footer > div { gap: 10px; }
.footer-marks { display: flex; gap: 3px; transform: rotate(6deg); }
.footer-marks i { display: block; height: 13px; width: 4px; border-radius: 50% 18%; transform: rotate(22deg); background: var(--blue); }
.footer-marks i:nth-child(2) { background: #d9533c; }.footer-marks i:nth-child(3) { background: #d49a24; }
.room-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0 10px; }
.subtle { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; background: var(--card); font-size: .9rem; }
.text-btn { font-size: .93rem; text-decoration: underline; text-underline-offset: 3px; padding: 7px; }
.room-heading { padding: 13px 0 26px; }
.room-heading .micro { color: var(--blue); margin-bottom: 7px; }
.room-heading h1 { font-size: clamp(2.4rem,4.8vw,4.1rem); letter-spacing: -.045em; max-width: 24ch; }
.room-grid { grid-template-columns: minmax(0,1.7fr) minmax(255px,.8fr); gap: 28px; }
.invite-sheet { padding: 38px 34px 25px; position: relative; }
.big-code { font-size: clamp(2.5rem,6.4vw,5.5rem); line-height: 1.1; font-weight: 800; color: var(--blue); letter-spacing: .045em; }
.invite-sheet > p:not(.micro,.big-code) { margin: 12px 0 19px; max-width: 36ch; }
.room-settings { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 26px; }
.room-settings dt { font-size: .83rem; color: var(--muted); }
.room-settings dd { margin: 2px 0 0; font-weight: 700; }
.side-card { padding: 21px; }
.card-title, .board-head, .dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title h2 { font-size: 1.4rem; letter-spacing: -.045em; }
.roster { list-style: none; padding: 0; margin: 13px 0 18px; }
.roster li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e1e2d9; min-height: 45px; }
.roster li:last-child { border-bottom: 0; }
.artist-chip { flex: none; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 45% 51% 42% 52%; color: white; background: var(--artist); font-size: .85rem; font-weight: 750; }
.artist-chip.empty { background: transparent; border: 1px dashed #9b9e91; }
.artist-name { font-weight: 650; overflow-wrap: anywhere; min-width: 0; }
.empty-name { color: var(--muted); font-size: .92rem; font-weight: 400; }
.artist-status { margin-left: auto; flex: none; max-width: 44%; font-size: .8rem; color: var(--muted); text-align: right; }
.is-active .artist-status { font-weight: 750; color: var(--blue); }
.drawing-card { overflow: hidden; box-shadow: 3px 4px 0 #d7d6c8; }
.board-head { min-height: 49px; padding: 10px 17px; }
.active-label { font-weight: 750; font-size: 1.05rem; }
.clock { font-family: "Courier New", monospace; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock.urgent { color: #a13125; }
.timer-track { height: 3px; background: #dedfd3; }
.timer-track i { display: block; height: 100%; background: var(--blue); transform-origin: left; }
#board { display: block; width: 100%; aspect-ratio: 8/5; }
#board.drawable { touch-action: none; cursor: crosshair; }
#board:focus-visible { outline-offset: -4px; }
.board-help { border-top: 1px solid var(--line); padding: 12px 16px; }
.side-card .wide + .wide { margin-top: 12px; }
.waiting-state, .connection { padding: 16px; background: #fff2c9; border: 1px solid #c1aa61; border-radius: 6px; }
.connection { margin-top: 18px; }
dialog { color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; width: min(470px,calc(100% - 32px)); padding: 0; box-shadow: 5px 6px 0 #3337; max-height: 85svh; }
dialog::backdrop { background: #23292065; }
.dialog-body { padding: 25px; }
.dialog-top { margin-bottom: 9px; }
.dialog-body h2 { font-size: 2rem; letter-spacing: -.06em; margin-bottom: 17px; }
.close { font: 1.6rem/1 var(--type); background: transparent; border: 0; padding: 4px 8px; }
.rules-list { padding-left: 1.35rem; }.rules-list li { padding-left: 4px; margin: 13px 0; }
.rules-list li::marker { font-weight: 700; color: var(--blue); }
.keyboard-note { margin: 17px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
#share-url { margin-bottom: 16px; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 11px 18px; background: var(--ink); color: white; border-radius: 6px; box-shadow: 0 3px 12px #0002; text-align: center; width: max-content; max-width: calc(100% - 24px); }
@media (min-width: 1500px) { .intro { padding-top: 65px; padding-bottom: 46px; } }
@media (max-width: 900px) {
  .mast-inner,.page,footer { width: calc(100% - 52px); }
  .home-grid { gap: 23px; grid-template-columns: minmax(0,1fr) minmax(310px,.86fr); }
  .intro { gap: 30px; }
  .setup-form { padding-inline: 18px; }.room-grid { gap: 18px; }
  figcaption { padding: 16px; }.replay { gap: 4px; }
}
@media (max-width: 700px) {
  .mast-inner,.page,footer { width: min(calc(100% - 36px), 540px); }
  .mast-inner { min-height: 63px; }.brand { font-size: 1.1rem; gap: 8px; }#brand-mark { width: 31px; height: 31px; }
  .help-button { font-size: .83rem; gap: 5px; }.intro { display: block; padding: 26px 0 24px; }
  .intro h1 { font-size: clamp(2.8rem,14vw,5rem); }.intro p { margin-top: 9px; max-width: 43ch; font-size: 1.01rem; }
  .home-grid,.room-grid { grid-template-columns: minmax(0,1fr); gap: 26px; }
  .setup-card { grid-row: 1; }.setup-form { padding: 18px 20px 16px; }
  .sample-card { margin: 0 4px; }.sample-paper { min-height: 0; aspect-ratio: 1.86; }
  .sketch-label { top: 11px; left: 13px; }.page { padding-bottom: 38px; }
  .room-bar { padding-top: 15px; }.room-heading { padding: 12px 0 22px; }
  .side-card { padding: 17px; }.invite-sheet { padding: 26px 19px 19px; }
  .room-settings { gap: 10px 18px; }.big-code { font-size: clamp(2.8rem,12vw,4rem); }
  footer { padding-block: 15px 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
