@font-face {
  font-family: Cairo;
  src: url("/draw/font.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
}
* {
  box-sizing: border-box;
}
html {
  background: #f8f5ef;
  color: #302b42;
  font-family: Cairo, Arial, sans-serif;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a4d9c3;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.site-header {
  max-width: 1280px;
  margin: auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e0d7;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: #7c59cf;
  color: #fff;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  transform: rotate(-10deg);
  font-size: 35px;
}
.brand-dot {
  color: #ee8269;
}
.header-note {
  font-size: 14px;
  color: #807789;
}
.header-note span {
  color: #ee9474;
  margin-right: 15px;
}
.live-pill {
  padding: 7px 13px;
  background: #e5f1e7;
  border-radius: 30px;
  font-size: 12px;
  color: #36724a;
  white-space: nowrap;
}
.live-pill i,
.live-dot {
  display: inline-block;
  background: #58ac78;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 5px;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 0 32px;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 52px 14px 45px;
  min-height: 440px;
}
.eyebrow {
  font-size: 12px;
  color: #85729e;
  font-weight: bold;
  letter-spacing: 0.4px;
}
.hero .eyebrow {
  display: inline-block;
  background: #eee6f7;
  padding: 5px 13px;
  border-radius: 20px;
}
.hero h1 {
  font-size: 60px;
  line-height: 1.38;
  letter-spacing: -2px;
  margin: 17px 0 15px;
  position: relative;
  width: max-content;
}
.hero h1 span {
  color: #7c59cf;
}
.hero h1 svg {
  position: absolute;
  bottom: -5px;
  width: 250px;
  left: 0;
  height: 16px;
  fill: none;
  stroke: #f5ba65;
  stroke-width: 3;
  stroke-linecap: round;
}
.hero p {
  font-size: 16px;
  line-height: 1.95;
  color: #817789;
  margin: 18px 0;
}
.hero-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #74677d;
}
.hero-tags span:first-child {
  color: #5a8b72;
}
.hero-art {
  position: relative;
  height: 355px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #ece3f3 0, transparent 68%);
}
.doodle-card {
  width: 245px;
  height: 290px;
  border: 2px solid #ded4e7;
  border-radius: 20px;
  background: #fffefa;
  box-shadow: 9px 12px 0 #e4d8ef;
  transform: rotate(-9deg);
  padding: 18px 18px 9px;
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 2;
}
.doodle-top {
  align-self: flex-start;
  font-size: 15px;
  color: #83758f;
}
.apple {
  width: 205px;
  height: 200px;
}
.doodle-bottom {
  font-size: 11px;
  color: #a296ad;
}
.paper-pin {
  position: absolute;
  width: 80px;
  height: 22px;
  background: #f9d99cba;
  top: -12px;
  left: 80px;
  transform: rotate(5deg);
}
.guess-bubble {
  position: absolute;
  background: #fff;
  border: 2px solid #342d43;
  box-shadow: 4px 4px 0 #342d43;
  border-radius: 15px;
  bottom: 14px;
  left: 24px;
  z-index: 4;
  padding: 12px 24px;
  font-size: 21px;
  transform: rotate(4deg);
}
.guess-bubble span {
  font-size: 14px;
  color: #47956e;
  margin-right: 15px;
}
.art-star {
  position: absolute;
  color: #ec8d73;
  z-index: 3;
}
.star-one {
  right: 32px;
  top: 0;
  font-size: 50px;
}
.star-two {
  left: 40px;
  top: 38px;
  font-size: 43px;
  color: #8a6cbf;
}
.art-orbit {
  position: absolute;
  border: 2px dashed #c9bcd7;
  border-radius: 50%;
  width: 305px;
  height: 305px;
  transform: rotate(20deg);
  opacity: 0.55;
}
.orbit-two {
  width: 355px;
  height: 220px;
  transform: rotate(-28deg);
}
.pencil {
  position: absolute;
  width: 28px;
  height: 146px;
  border-radius: 8px 8px 2px 2px;
  transform: rotate(33deg);
  right: 31px;
  bottom: 3px;
  background: linear-gradient(
    90deg,
    #f1b748 0 25%,
    #ffd580 25% 75%,
    #e7a334 75%
  );
  z-index: 3;
  border: 2px solid #5e4a37;
}
.pencil:after {
  content: "";
  position: absolute;
  bottom: -28px;
  left: -2px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #5e4a37;
}
.pencil span {
  display: block;
  height: 25px;
  background: #f090a4;
  border-radius: 6px 6px 0 0;
  border-bottom: 7px solid #c9c6cb;
}
.little-dots {
  position: absolute;
  left: 15px;
  bottom: 122px;
  font-size: 29px;
  letter-spacing: 5px;
  color: #86b895;
  transform: rotate(-25deg);
}
.entry-card {
  display: flex;
  align-items: center;
  gap: 26px;
  border: 1px solid #e5dfd8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 #ece6de;
  padding: 24px 27px;
}
.entry-name {
  flex: 1.1;
  min-width: 180px;
}
label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: bold;
}
input,
select {
  width: 100%;
  min-width: 0;
  background: #fbfaf8;
  border: 1.5px solid #e5dfe9;
  border-radius: 12px;
  padding: 11px 14px;
  color: #302b42;
  min-height: 48px;
  font-size: 14px;
}
input::placeholder {
  color: #b0a7b7;
}
.name-field {
  display: flex;
  border: 1.5px solid #e5dfe9;
  border-radius: 12px;
  overflow: hidden;
  background: #fbfaf8;
}
.name-field input {
  border: 0;
  background: none;
}
.name-field button {
  border: 0;
  background: #f0e9f8;
  width: 53px;
  flex-shrink: 0;
  font-size: 26px;
}
.button {
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  white-space: nowrap;
  font-size: 14px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.button:hover {
  transform: translateY(-2px);
}
.primary {
  background: #7c59cf;
  color: white;
  box-shadow: 0 4px 0 #6240b3;
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #6240b3;
}
.secondary {
  background: #f0eaf8;
  color: #7152a4;
}
.small {
  padding: 10px 16px;
}
.entry-action {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 8px;
  align-self: flex-end;
}
.entry-action span {
  font-size: 10px;
  color: #94879f;
}
.entry-divider {
  height: 66px;
  width: 1px;
  background: #ece6ed;
}
.code-form {
  flex: 0.85;
  min-width: 210px;
}
.code-form > div {
  display: flex;
  gap: 8px;
}
.code-form input {
  width: 135px;
  flex: 1;
  text-align: center;
  text-transform: uppercase;
  font-family: Cairo, Arial, sans-serif;
}
.rooms-section {
  padding: 40px 0 25px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 0;
  font-size: 24px;
}
.section-heading h2 span {
  color: #eeab68;
  margin-right: 8px;
}
.section-heading p {
  margin: 4px 0 0;
  color: #97899e;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  color: #7c59b1;
  font-size: 12px;
  min-height: 44px;
  padding: 8px;
}
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  min-height: 80px;
}
.room-card {
  background: #fff;
  border: 1px solid #e5dfd8;
  border-radius: 18px;
  padding: 19px;
  transition: transform 0.16s;
}
.room-card:hover {
  transform: translateY(-3px);
}
.room-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.room-symbol {
  display: grid;
  place-items: center;
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f0e9f7;
}
.room-card:nth-child(3n + 2) .room-symbol {
  background: #fff0d9;
}
.room-card:nth-child(3n) .room-symbol {
  background: #e6f2e8;
}
.room-card h3 {
  font-size: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}
.room-card p {
  margin: 3px 0;
  color: #a094a9;
  font-size: 10px;
}
.room-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #e9e1ed;
  margin-top: 15px;
  padding-top: 13px;
  font-size: 12px;
}
.room-bottom .button {
  min-height: 39px;
  padding: 7px 18px;
  font-size: 12px;
}
.room-status {
  color: #6a9679;
  font-size: 11px;
}
.empty-rooms {
  grid-column: 1/-1;
  border: 1.5px dashed #d9cee5;
  border-radius: 19px;
  text-align: center;
  padding: 24px;
  background: #f1edf5;
  color: #81718e;
  font-size: 14px;
}
.empty-rooms strong {
  display: block;
  color: #51455f;
  margin-bottom: 4px;
}
.empty-rooms .empty-icon {
  font-size: 33px;
  display: block;
}
.how-to {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 30px 0 47px;
  text-align: center;
}
.how-to h3 {
  font-size: 16px;
  margin: 10px 0 4px;
}
.how-to p {
  font-size: 12px;
  color: #918498;
  margin: 0;
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 17px;
  transform: rotate(-7deg);
}
.pink {
  background: #f9dce2;
  color: #ba6078;
}
.yellow {
  background: #fae9b9;
  color: #a97e22;
}
.mint {
  background: #dcede0;
  color: #4d8d62;
}
footer {
  border-top: 1px solid #e5dfd8;
  max-width: 1216px;
  margin: 10px auto 0;
  padding: 22px 5px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #a195a7;
  font-size: 11px;
}
.brand-mini {
  font-size: 16px;
  color: #887197;
}
.join-screen {
  max-width: 470px;
  margin: 55px auto;
  text-align: center;
  background: #fff;
  border: 1px solid #e8dfed;
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 8px 0 #ede7f3;
}
.join-illustration {
  font-size: 60px;
  color: #8260c4;
  background: #f2ebfa;
  border-radius: 24px;
  width: 100px;
  margin: 0 auto 22px;
}
.join-screen h1 {
  font-size: 28px;
  margin: 12px 0;
}
.join-screen p {
  color: #988c9f;
  font-size: 13px;
}
.join-screen form {
  text-align: right;
  margin: 24px 0 8px;
}
.join-screen .button {
  width: 100%;
  margin-top: 14px;
}
.game {
  padding: 22px 0 35px;
}
.room-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}
.room-header h1 {
  font-size: 24px;
  margin: 0;
  overflow-wrap: anywhere;
}
.room-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.code-tag {
  font-family: monospace;
  background: #eae4f2;
  color: #7b6893;
  padding: 8px;
  border-radius: 9px;
  letter-spacing: 1px;
}
.icon-button {
  border: 1px solid #e8e1ed;
  background: white;
  color: #85768f;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
}
.game-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 250px;
  gap: 16px;
  align-items: start;
}
.panel {
  border: 1px solid #e4dcea;
  border-radius: 17px;
  background: white;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee8f2;
}
.panel-heading h2 {
  font-size: 14px;
  margin: 0;
}
.panel-heading h2 span {
  color: #b4a0c9;
}
.count-tag {
  font-size: 11px;
  background: #eee7f6;
  color: #876aa5;
  border-radius: 8px;
  padding: 2px 7px;
}
.player {
  display: flex;
  align-items: center;
  padding: 13px 11px;
  border-bottom: 1px solid #f1edf5;
  gap: 9px;
}
.player.is-me {
  background: #f8f4fc;
}
.player.is-drawing {
  background: #fff5df;
}
.player.is-guessed {
  background: #eff9f0;
}
.player-avatar {
  font-size: 24px;
  background: #f3edf7;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  text-align: center;
  flex-shrink: 0;
}
.player-info {
  min-width: 0;
  flex: 1;
}
.player-name {
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.player-role {
  font-size: 9px;
  color: #a095a8;
}
.player-score {
  font-size: 15px;
  color: #8262b4;
  font-weight: bold;
}
.scoring-note {
  font-size: 10px;
  color: #a296ac;
  line-height: 1.9;
  padding: 17px 12px;
  background: #fbf9fd;
}
.turn-bar {
  height: 55px;
  background: #eee7f7;
  border: 1px solid #ddd0ec;
  border-radius: 15px 15px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 10px 16px;
  font-size: 11px;
}
.word-hint {
  font-size: 17px;
  color: #64458c;
  text-align: center;
  letter-spacing: 3px;
  max-width: 60%;
  overflow-wrap: anywhere;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  min-width: 43px;
  text-align: center;
  background: white;
  border-radius: 9px;
  padding: 1px 4px;
  color: #847296;
}
.timer.urgent {
  background: #ffe5df;
  color: #d55d50;
}
.board-shell {
  position: relative;
  aspect-ratio: 1;
  background: white;
  border: 1.5px solid #ddd0ec;
  border-top: 0;
  overflow: hidden;
  isolation: isolate;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
canvas.locked {
  cursor: default;
  touch-action: pan-y;
}
.board-caption {
  position: absolute;
  bottom: 9px;
  right: 12px;
  pointer-events: none;
  color: #b9afc3;
  font-size: 10px;
}
.board-overlay {
  position: absolute;
  inset: 0;
  background: #fffcf8f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  gap: 10px;
  overflow: auto;
}
.board-overlay .large-emoji {
  font-size: 43px;
}
.board-overlay h2 {
  font-size: 23px;
  margin: 0;
}
.board-overlay p {
  color: #9a8ba5;
  font-size: 12px;
  margin: 0 0 5px;
}
.word-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(360px, 100%);
}
.word-choice {
  border: 2px solid #e4d8f0;
  border-radius: 13px;
  background: #fff;
  color: #7b55aa;
  min-height: 51px;
  font-size: 18px;
}
.word-choice:hover {
  background: #efe5fb;
  border-color: #a481ce;
  transform: rotate(-2deg);
}
.answer-word {
  font-size: 38px;
  color: #7c59cf;
}
.winner-list {
  font-size: 13px;
  white-space: pre-line;
  line-height: 2;
  max-height: 110px;
  overflow: auto;
  width: 100%;
}
.tools-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 11px 6px;
  background: white;
  border: 1px solid #e2d8e9;
  border-radius: 0 0 14px 14px;
  min-height: 65px;
}
.palette {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.swatch {
  height: 25px;
  width: 25px;
  border-radius: 50%;
  border: 2px solid #e8e3eb;
  min-height: 34px;
  min-width: 34px;
  box-shadow: inset 0 0 0 3px white;
}
.swatch.active {
  outline: 2px solid #a78ac7;
  outline-offset: 1px;
}
.tool-separator {
  height: 27px;
  width: 1px;
  background: #e9e1ed;
  margin: 0 3px;
}
.brushes {
  display: flex;
  gap: 0;
}
.brush {
  border: 0;
  background: white;
  width: 30px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.brush i {
  background: #5f526e;
  border-radius: 50%;
}
.brush.active {
  background: #eae0f5;
}
.tools-bar .icon-button {
  min-width: 34px;
  width: 34px;
  height: 40px;
  border: 0;
  font-size: 22px;
}
.drawing-tip {
  font-size: 11px;
  text-align: center;
  color: #a293ad;
  margin: 10px 0;
}
.chat-panel {
  height: 535px;
  display: flex;
  flex-direction: column;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 12px;
  min-height: 150px;
  scroll-behavior: smooth;
}
.message {
  font-size: 12px;
  margin: 0 0 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.message strong {
  color: #806499;
  font-size: 11px;
}
.message.system {
  color: #a196ab;
  font-size: 10px;
  text-align: center;
  background: #f8f5fb;
  padding: 7px;
  border-radius: 8px;
}
.message.correct {
  color: #438361;
  background: #eaf7ee;
  padding: 9px;
  border-radius: 9px;
  font-weight: bold;
}
.chat-panel form {
  display: flex;
  gap: 5px;
  padding: 9px;
  border-top: 1px solid #eee7f5;
}
.chat-panel form input {
  padding: 9px;
  font-size: 12px;
}
.chat-panel form button {
  width: 42px;
  min-width: 42px;
  border: 0;
  background: #8a63c5;
  color: white;
  border-radius: 10px;
  font-size: 23px;
}
.chat-note {
  font-size: 9px;
  text-align: center;
  color: #a497ac;
  padding: 0 7px 9px;
}
.connection {
  background: #fff0d7;
  color: #906528;
  border: 1px solid #efcea1;
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 12px;
  margin-bottom: 15px;
}
.connection .text-button {
  color: #8b6436;
}
dialog {
  border: 1px solid #e4d8ef;
  border-radius: 24px;
  padding: 29px;
  width: min(440px, calc(100% - 32px));
  color: #40334e;
  box-shadow: 0 20px 100px #39235440;
}
dialog::backdrop {
  background: #30223d60;
  backdrop-filter: blur(4px);
}
dialog h2 {
  margin: 5px 0;
  font-size: 25px;
}
dialog p {
  font-size: 12px;
  color: #9e8da9;
  margin-bottom: 23px;
}
.dialog-close {
  position: absolute;
  left: 16px;
  top: 16px;
  border: 0;
  background: #f5effa;
}
.modal-emoji {
  font-size: 35px;
}
.form-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.form-row > label {
  flex: 1;
}
.form-row select {
  display: block;
  margin-top: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px 0;
  font-size: 13px;
}
.checkbox-label input {
  width: 20px;
  min-height: 20px;
  accent-color: #8b5fc2;
}
.checkbox-label small {
  display: block;
  color: #a08fac;
  font-size: 10px;
}
.full {
  width: 100%;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #3c304d;
  color: white;
  border: 1px solid #a994be;
  box-shadow: 0 8px 30px #2f164b30;
  border-radius: 13px;
  padding: 13px 24px;
  max-width: calc(100% - 24px);
  font-size: 13px;
  z-index: 1000;
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1400px) {
  .game-grid {
    grid-template-columns: 205px minmax(0, 1fr) 270px;
  }
  .chat-panel {
    height: 555px;
  }
}
@media (max-width: 1050px) {
  .game-grid {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
  }
  .chat-panel {
    grid-column: 2;
    height: 270px;
  }
  .players-panel {
    grid-row: 1/3;
  }
  .hero h1 {
    font-size: 50px;
  }
  .entry-card {
    gap: 15px;
    padding: 20px;
  }
  .entry-divider {
    display: none;
  }
  .entry-name {
    min-width: 150px;
  }
  .code-form {
    min-width: 180px;
  }
  .hero {
    padding-top: 35px;
  }
  .room-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .site-header {
    padding: 18px 20px;
  }
  .brand {
    font-size: 26px;
  }
  .brand-icon {
    width: 37px;
    height: 37px;
    font-size: 29px;
  }
  .header-note {
    display: none;
  }
  main {
    padding: 0 18px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 30px 3px 26px;
    gap: 12px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero h1 {
    margin: 16px auto;
    font-size: 45px;
  }
  .hero h1 svg {
    width: 205px;
  }
  .hero p {
    font-size: 14px;
  }
  .hero-tags {
    justify-content: center;
    font-size: 11px;
    gap: 12px;
  }
  .hero-art {
    height: 230px;
    margin: 0 auto;
    width: 310px;
    max-width: 100%;
  }
  .doodle-card {
    width: 175px;
    height: 208px;
    padding: 13px;
    box-shadow: 6px 8px 0 #e4d8ef;
  }
  .apple {
    width: 142px;
    height: 146px;
  }
  .doodle-top {
    font-size: 11px;
  }
  .doodle-bottom {
    font-size: 8px;
  }
  .paper-pin {
    left: 50px;
    width: 60px;
    height: 18px;
  }
  .guess-bubble {
    font-size: 17px;
    padding: 6px 13px;
    bottom: 4px;
    left: -2px;
    border-radius: 11px;
  }
  .guess-bubble span {
    font-size: 11px;
    margin-right: 7px;
  }
  .art-orbit {
    width: 212px;
    height: 210px;
  }
  .orbit-two {
    width: 285px;
    height: 170px;
  }
  .pencil {
    height: 99px;
    width: 21px;
    right: 21px;
    bottom: 20px;
  }
  .pencil:after {
    border-left-width: 10px;
    border-right-width: 11px;
    border-top-width: 22px;
    bottom: -23px;
  }
  .star-one {
    font-size: 35px;
    right: 12px;
  }
  .star-two {
    font-size: 29px;
    left: 12px;
    top: 18px;
  }
  .little-dots {
    font-size: 23px;
    left: 0;
    bottom: 94px;
  }
  .entry-card {
    flex-wrap: wrap;
    padding: 18px;
    gap: 15px;
    border-radius: 18px;
  }
  .entry-name {
    flex: 1 1 100%;
  }
  .entry-action {
    flex: 1;
    align-self: auto;
  }
  .entry-action .button {
    width: 100%;
  }
  .entry-action span {
    display: none;
  }
  .code-form {
    flex: 1 1 100%;
    border-top: 1px dashed #e8dfed;
    padding-top: 15px;
  }
  .code-form > div {
    gap: 10px;
  }
  .rooms-section {
    padding-top: 30px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .section-heading p {
    font-size: 11px;
  }
  .room-grid {
    grid-template-columns: 1fr;
  }
  .how-to {
    gap: 9px;
    padding: 25px 0;
  }
  .how-to h3 {
    font-size: 13px;
  }
  .how-to p {
    font-size: 10px;
    line-height: 1.8;
  }
  .step-number {
    width: 29px;
    height: 29px;
    font-size: 14px;
  }
  footer {
    margin: 12px 18px 0;
    padding: 18px 0;
    flex-wrap: wrap;
    font-size: 9px;
  }
  footer span:last-child {
    display: none;
  }
  .game {
    padding-top: 18px;
  }
  .room-header {
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
  }
  .room-header h1 {
    font-size: 20px;
  }
  .room-header .eyebrow {
    font-size: 10px;
  }
  .room-actions {
    width: 100%;
    gap: 8px;
  }
  .room-actions .button {
    flex: 1;
    font-size: 12px;
    min-height: 44px;
    padding: 8px 12px;
  }
  .code-tag {
    font-size: 12px;
  }
  .game-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
  }
  .board-column {
    width: 100%;
    order: 0;
  }
  .players-panel {
    width: 100%;
    order: 2;
  }
  .chat-panel {
    width: 100%;
    height: 290px;
    order: 1;
  }
  .players-panel #players {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .scoring-note {
    display: none;
  }
  .turn-bar {
    height: 50px;
    padding: 8px 11px;
    font-size: 10px;
  }
  .word-hint {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .timer {
    font-size: 16px;
  }
  .board-overlay {
    padding: 12px;
    gap: 6px;
  }
  .board-overlay .large-emoji {
    font-size: 28px;
  }
  .board-overlay h2 {
    font-size: 18px;
  }
  .board-overlay p {
    font-size: 10px;
    margin: 0;
  }
  .board-overlay .button {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 12px;
  }
  .word-choice {
    min-height: 42px;
    font-size: 16px;
  }
  .word-choices {
    gap: 7px;
    max-width: 280px;
  }
  .answer-word {
    font-size: 29px;
  }
  .winner-list {
    max-height: 70px;
    font-size: 10px;
  }
  .tools-bar {
    gap: 5px;
    padding: 10px 6px;
  }
  .palette {
    width: 100%;
    gap: 5px;
  }
  .swatch {
    min-width: 24px;
    min-height: 30px;
    width: 26px;
    height: 30px;
    border-radius: 50%;
  }
  .brush {
    width: 38px;
  }
  .tool-separator {
    display: none;
  }
  .tools-bar .icon-button {
    width: 40px;
    min-width: 40px;
    height: 42px;
  }
  .drawing-tip {
    margin-bottom: 0;
    font-size: 10px;
  }
  .board-caption {
    font-size: 8px;
  }
  .join-screen {
    padding: 26px 20px;
  }
  .join-screen h1 {
    font-size: 25px;
  }
  .messages {
    min-height: 130px;
  }
  .chat-panel form input {
    font-size: 16px;
  }
  .entry-card input,
  #join-name {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Comfortable finger targets; spectators keep the canvas and chat close together. */
.swatch {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  box-shadow: inset 0 0 0 8px white;
}
.brush {
  min-width: 44px;
  min-height: 44px;
}
.tools-bar .icon-button {
  min-width: 44px;
  min-height: 44px;
}
.room-bottom .button,
.word-choice {
  min-height: 44px;
}
.chat-panel form button {
  min-width: 44px;
  min-height: 48px;
}
@media (max-width: 720px) {
  .in-game .site-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .in-game .game {
    padding-top: 12px;
  }
  .chat-panel {
    height: 245px;
  }
  .tools-bar {
    padding: 7px 5px;
  }
  .palette {
    gap: 2px;
  }
  .swatch {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .room-header {
    margin-bottom: 12px;
  }
  .drawing-tip {
    font-size: 10px;
  }
  .board-shell {
    border-radius: 0 0 12px 12px;
  }
}

/* Keep the board central; a compact player strip frees its former side column. */
.in-game .site-header,
.in-game footer {
  display: none;
}
.in-game main {
  max-width: 1520px;
  padding: env(safe-area-inset-top, 0px)
    max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px)
    max(16px, env(safe-area-inset-left, 0px));
}
.game {
  padding: 12px 0 16px;
}
.room-header {
  margin-bottom: 10px;
}
.room-header h1 {
  font-size: 20px;
}
.game-grid {
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 12px;
}
.players-panel {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
}
.players-panel .panel-heading {
  padding: 6px 12px;
  gap: 10px;
  border-bottom: 0;
}
#players {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.player {
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 200px;
  padding: 5px 12px;
  border: 0;
  border-inline-start: 1px solid #eee8f2;
}
.player-avatar {
  width: 30px;
  height: 30px;
  font-size: 21px;
}
.player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-role {
  display: none;
}
.player.is-drawing .player-role,
.player.is-guessed .player-role {
  display: block;
}
.board-column {
  width: 100%;
  max-width: min(100%, max(360px, calc(100svh - 310px)));
  margin-inline: auto;
}
.chat-panel {
  grid-column: 2;
  height: min(800px, max(550px, calc(100svh - 160px)));
}
.turn-bar {
  height: 46px;
}
.tools-bar {
  padding: 6px;
  gap: 5px;
}
.palette {
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  max-width: 100%;
  padding: 3px;
}
.swatch {
  flex: 0 0 44px;
}
.hero {
  min-height: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}
.hero h1 {
  font-size: 46px;
}
.hero-art {
  height: 270px;
  transform: scale(0.8);
}
.empty-rooms {
  padding: 22px;
}
.board-overlay p:empty {
  display: none;
}
input,
select {
  font-size: 16px;
}
.board-overlay .button {
  min-height: 44px;
}

@media (max-width: 1050px) and (min-width: 721px) {
  .game-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .board-column {
    max-width: 100%;
  }
  .chat-panel {
    height: 550px;
  }
}
@media (max-width: 720px) {
  .site-header {
    padding: 16px;
  }
  main {
    padding: 0 14px;
  }
  .hero {
    display: block;
    padding: 18px 0;
  }
  .hero-art {
    display: none;
  }
  .hero h1 {
    font-size: 30px;
    margin: 0 auto 12px;
    line-height: 1.5;
  }
  .hero h1 br {
    display: none;
  }
  .hero h1 svg {
    display: none;
  }
  .hero-tags {
    font-size: 10px;
    gap: 10px;
  }
  .entry-card {
    padding: 14px;
    gap: 12px;
  }
  .rooms-section {
    padding-top: 20px;
  }
  .in-game main {
    padding-inline: max(8px, env(safe-area-inset-right, 0px))
      max(8px, env(safe-area-inset-left, 0px));
  }
  .in-game .game {
    padding-top: 6px;
  }
  .room-header {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 6px;
  }
  .room-header > div:first-child {
    min-width: 0;
    flex: 1;
  }
  .room-header h1 {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .room-actions {
    width: auto;
    flex-shrink: 0;
    gap: 5px;
  }
  .room-actions .button {
    padding: 7px 10px;
    font-size: 12px;
  }
  .code-tag {
    display: none;
  }
  .game-grid {
    gap: 8px;
  }
  .board-column {
    max-width: 100%;
  }
  .turn-bar {
    height: 44px;
    padding: 6px 10px;
  }
  .tools-bar {
    padding: 4px;
    gap: 2px;
  }
  .palette {
    flex: 1 1 100%;
    width: 100%;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .brushes {
    flex: 0 0 auto;
  }
  .chat-panel {
    height: 185px;
  }
  .chat-panel .panel-heading {
    display: none;
  }
  .messages {
    min-height: 0;
    padding: 8px 10px;
  }
  .message {
    font-size: 13px;
    margin-bottom: 7px;
  }
  .chat-panel form {
    padding: 6px;
    background: #fff;
  }
  .chat-panel form input {
    min-width: 0;
    font-size: 16px;
  }
  .players-panel {
    flex-direction: column;
  }
  .players-panel .panel-heading {
    padding: 5px 10px;
  }
  .players-panel #players {
    display: flex;
    padding-bottom: 4px;
  }
  .player {
    min-width: 128px;
  }
  .board-caption {
    font-size: 10px;
  }
  .word-choice {
    min-height: 48px;
    font-size: 18px;
  }
  .board-overlay {
    padding: 16px;
    gap: 10px;
  }
  .board-overlay h2 {
    font-size: 20px;
  }
  .winner-list {
    max-height: 150px;
    font-size: 13px;
  }
  .connection {
    margin: 4px 0;
    padding: 5px 9px;
  }
  .join-screen {
    margin: 22px auto;
  }
  dialog {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px 18px;
  }
}
@media (orientation: landscape) and (max-height: 550px) and (max-width: 950px) {
  .game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .board-column {
    grid-column: 1;
    grid-row: 1;
  }
  .chat-panel {
    grid-column: 2;
    grid-row: 1;
    height: 300px;
  }
  .players-panel {
    grid-row: 2;
  }
}

/* Drawing gestures must not invoke iPad text selection or image callouts. */
.board-shell,
.board-shell *,
.tools-bar,
.view-tools,
.art-preview {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#canvas {
  transform-origin: 0 0;
}
#canvas.panning {
  cursor: grab;
  touch-action: none;
}
.view-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px;
  background: #f0eafb;
  border-inline: 1px solid #ddd0ec;
}
.view-tools button {
  min-width: 44px;
  min-height: 44px;
}
[aria-pressed="true"] {
  background: #e4d8ff;
  color: #5b21b6;
  box-shadow: inset 0 0 0 2px #8b5cf6;
}
.board-overlay:has(.winner-list) {
  justify-content: flex-start;
}
.board-overlay > * {
  flex-shrink: 0;
}
.color-gallery {
  grid-column: 1;
  padding: 18px;
  min-width: 0;
}
.gallery-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.gallery-heading h2 {
  font-size: 22px;
  margin: 0;
}
.gallery-clock {
  font-weight: bold;
  color: #7c3aed;
  white-space: nowrap;
}
.gallery-note {
  font-size: 13px;
  color: #746781;
  margin: 8px 0 16px;
}
.art-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.art-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: #f7f3fc;
  border-radius: 16px;
}
.art-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.art-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #e2d6ed;
  border-radius: 10px;
  cursor: default;
  touch-action: pan-y;
}
.art-card button {
  min-height: 44px;
  width: 100%;
}
.color-gallery > .button {
  margin-top: 18px;
}
.art-votes {
  color: #7c3aed;
}
.finish-coloring {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 4px;
}
.finish-coloring small {
  color: #746781;
  font-size: 12px;
}
.finish-coloring .button {
  min-height: 44px;
  white-space: nowrap;
}
.message.ready {
  color: #166534;
  background: #edf9f0;
  border-radius: 8px;
  padding: 8px;
}
#game-mode,
#difficulty {
  width: 100%;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .color-gallery {
    padding: 10px;
  }
  .gallery-heading h2 {
    font-size: 17px;
  }
  .art-grid {
    gap: 7px;
  }
  .art-card {
    padding: 5px;
    font-size: 12px;
  }
  .art-card .button {
    padding: 6px;
    font-size: 12px;
  }
}
