:root {
  --ink: #171717;
  --muted: #6c685f;
  --paper: #fffdf7;
  --paper-deep: #f7f1e5;
  --orange: #ff7a00;
  --orange-dark: #e96300;
  --yellow: #ffd43b;
  --green: #1daa68;
  --red: #e84d3d;
  --blue: #4378ea;
  --line: #ded8cc;
  --shadow: 0 16px 45px rgba(51, 38, 19, 0.11);
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #efe8d9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 4%, rgba(255, 212, 59, 0.32), transparent 24rem),
    radial-gradient(circle at 90% 18%, rgba(255, 122, 0, 0.16), transparent 26rem),
    #efe8d9;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  background: rgba(255, 253, 247, 0.94);
  border-bottom: 1px solid rgba(94, 76, 49, 0.13);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  width: 46px;
  height: 46px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 45% 55% 52% 48% / 55% 50% 50% 45%;
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 7px;
  border-bottom: 2px solid var(--ink);
  border-radius: 50%;
  bottom: 8px;
}

.brand-eye {
  width: 5px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
  margin-top: -7px;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-bar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-field {
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid #ded6c8;
  border-radius: 12px;
  background: #fffdf7;
  overflow: hidden;
}

.language-field span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.language-field select {
  height: 100%;
  min-width: 104px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 10px 0 7px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-right: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b5afa5;
  box-shadow: 0 0 0 3px rgba(181, 175, 165, 0.18);
}

.connection-pill.is-online .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(29, 170, 104, 0.16);
}

.nickname-field {
  display: flex;
  align-items: center;
  height: 42px;
  background: #f3eee4;
  border: 1px solid #ded6c8;
  border-radius: 12px;
  overflow: hidden;
}

.nickname-field span {
  padding-left: 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.nickname-field input {
  width: 150px;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px 0 8px;
  font-weight: 800;
}

.button {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  padding: 0 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-primary {
  background: var(--orange);
  color: #171717;
}

.button-primary:hover {
  background: #ff8b23;
}

.button-dark {
  background: var(--ink);
  color: white;
  box-shadow: none;
}

.button-dark:hover {
  box-shadow: none;
}

.button-compact {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 11px;
  border-width: 1px;
}

.button-full {
  width: 100%;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.lobby-view {
  padding: 34px 30px 70px;
}

.hero-card {
  min-height: 410px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 251, 238, 0.96), rgba(255, 251, 238, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(30, 30, 30, 0.04) 23px);
  box-shadow: 8px 8px 0 var(--ink);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(#5e5547 0.65px, transparent 0.65px);
  background-size: 9px 9px;
  pointer-events: none;
}

.hero-copy {
  padding: 58px 34px 58px 68px;
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  color: var(--orange-dark);
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.hero-copy h1 {
  margin: 17px 0 18px;
  font-size: clamp(42px, 4.3vw, 67px);
  line-height: 1.08;
  letter-spacing: -0.065em;
  font-weight: 950;
}

.hero-copy h1 em {
  color: var(--orange);
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 6px;
  text-underline-offset: 8px;
  text-decoration-color: var(--yellow);
}

.hero-copy > p {
  max-width: 580px;
  margin: 0;
  color: #5e584e;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 650;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}

.text-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-underline-offset: 4px;
}

.hero-art {
  position: relative;
  min-height: 390px;
}

.paper-card {
  position: absolute;
  width: 260px;
  height: 205px;
  background: white;
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(23, 23, 23, 0.9);
}

.paper-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 70px;
  height: 25px;
  background: rgba(255, 214, 93, 0.72);
  transform: translateX(-50%) rotate(-2deg);
}

.paper-one {
  right: 44%;
  top: 45px;
  transform: rotate(-8deg);
}

.paper-two {
  right: 7%;
  bottom: 38px;
  transform: rotate(8deg);
  background: #fffbdd;
}

.sun-doodle {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid #f8bd16;
  right: 30px;
  top: 28px;
}

.sun-doodle::before {
  content: "☀";
  position: absolute;
  font-size: 78px;
  color: #f8bd16;
  left: -20px;
  top: -33px;
}

.mountain-doodle {
  position: absolute;
  width: 90px;
  height: 70px;
  border-left: 8px solid #2c9c65;
  border-top: 8px solid #2c9c65;
  transform: rotate(45deg) skew(-10deg, -10deg);
  left: 58px;
  bottom: 48px;
}

.doodle-line {
  position: absolute;
  width: 175px;
  height: 30px;
  border-bottom: 7px solid #3f7dea;
  border-radius: 50%;
  left: 38px;
  bottom: 22px;
  transform: rotate(-4deg);
}

.cat-doodle {
  position: absolute;
  width: 145px;
  height: 120px;
  border: 7px solid #242424;
  border-radius: 45% 45% 50% 50%;
  left: 54px;
  top: 43px;
  background: #ffbc44;
}

.cat-ear {
  position: absolute;
  width: 48px;
  height: 48px;
  border-top: 7px solid #242424;
  border-left: 7px solid #242424;
  background: #ffbc44;
  top: -29px;
  transform: rotate(45deg);
}

.cat-ear.left {
  left: 6px;
}

.cat-ear.right {
  right: 6px;
}

.cat-face {
  position: absolute;
  inset: 38px 0 0;
  text-align: center;
  font-family: monospace;
  font-size: 25px;
  font-weight: 900;
  z-index: 1;
}

.spark {
  position: absolute;
  color: var(--orange);
  font-size: 29px;
  font-weight: 900;
}

.spark-one {
  left: 24px;
  top: 30px;
}

.spark-two {
  right: 24px;
  bottom: 18px;
}

.pencil-art {
  position: absolute;
  right: 46%;
  bottom: 11px;
  width: 240px;
  height: 30px;
  border: 2px solid var(--ink);
  background: var(--orange);
  transform: rotate(22deg);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.5);
  z-index: 4;
}

.pencil-art::before {
  content: "";
  position: absolute;
  left: -43px;
  top: -2px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 42px solid #e1b57a;
}

.pencil-art::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -2px;
  width: 20px;
  height: 30px;
  border: 2px solid var(--ink);
  border-left: 0;
  background: #f196aa;
  border-radius: 0 7px 7px 0;
}

.lobby-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 62px 0 20px;
}

.lobby-toolbar h2,
.how-copy h2 {
  margin: 8px 0 0;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.lobby-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.lobby-summary strong {
  color: var(--ink);
  font-size: 17px;
}

.summary-divider {
  width: 1px;
  height: 16px;
  background: #bcb3a5;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid #cfc6b7;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-size: 18px;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.room-card {
  min-height: 175px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid #d5ccbd;
  border-radius: 19px;
  background: rgba(255, 253, 247, 0.91);
  box-shadow: 0 8px 22px rgba(67, 50, 24, 0.06);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border 150ms ease;
}

.room-card:hover {
  transform: translateY(-3px);
  border-color: #b6aa98;
  box-shadow: 0 14px 28px rgba(67, 50, 24, 0.1);
}

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.room-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 99px;
  background: #e8f5ed;
  color: #167348;
  font-size: 11px;
  font-weight: 900;
}

.room-state.playing {
  background: #fff0e2;
  color: #c95600;
}

.room-card-code {
  color: #918a7d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.room-card h3 {
  margin: 17px 0 5px;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.room-card-footer {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-people {
  font-size: 13px;
  font-weight: 850;
}

.join-button {
  min-height: 35px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 0 13px;
  background: white;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.join-button:hover {
  background: var(--yellow);
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1.5px dashed #b9af9e;
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.5);
}

.empty-doodle {
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 47% 53% 43% 57%;
  background: var(--yellow);
  font-size: 31px;
  font-weight: 950;
  transform: rotate(-7deg);
}

.empty-state h3 {
  margin: 17px 0 5px;
}

.empty-state p {
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state .button {
  min-height: 42px;
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.75fr 2.25fr;
  gap: 40px;
  margin-top: 70px;
  padding: 34px 0 0;
  border-top: 2px solid var(--ink);
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
}

.steps li {
  padding-left: 56px;
  position: relative;
}

.steps li > span {
  position: absolute;
  left: 0;
  top: -3px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 900;
}

.steps li:nth-child(2) > span {
  background: #ffad70;
}

.steps li:nth-child(3) > span {
  background: #9edbbf;
}

.steps strong {
  font-size: 16px;
}

.steps p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.game-view {
  padding: 20px 28px 35px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 20px;
}

.room-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.back-button {
  width: 42px;
  height: 42px;
  border: 1px solid #cfc6b7;
  border-radius: 13px;
  background: var(--paper);
  cursor: pointer;
  font-size: 20px;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.room-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.room-code {
  border: 0;
  background: transparent;
  padding: 0;
  color: #777064;
  cursor: pointer;
  font: inherit;
}

.room-heading h1 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.round-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timer-ring {
  --progress: 0deg;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--progress), #dcd4c7 var(--progress));
  position: relative;
}

.timer-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.timer-ring strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: var(--ink);
}

.prompt-banner {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  text-align: center;
}

.prompt-label,
.prompt-hint {
  font-size: 12px;
  font-weight: 850;
}

.prompt-label {
  color: #6b5200;
}

.prompt-word {
  font-size: 24px;
  letter-spacing: 0.05em;
}

.prompt-hint {
  color: #7e6819;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 13px;
  height: calc(100vh - 259px);
  min-height: 510px;
}

.canvas-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.canvas-frame {
  min-height: 0;
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 19px, #edf4fb 20px);
  box-shadow: 5px 5px 0 var(--ink);
}

#drawingCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

#drawingCanvas.is-locked {
  cursor: default;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.82), rgba(255, 253, 247, 0.93)),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(77, 142, 214, 0.09) 30px);
  text-align: center;
}

.waiting-mascot {
  width: 86px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 47% 53% 54% 46%;
  background: var(--yellow);
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.waiting-eye {
  width: 7px;
  height: 10px;
  background: var(--ink);
  border-radius: 50%;
  margin-top: -15px;
}

.waiting-smile {
  position: absolute;
  bottom: 16px;
  width: 28px;
  height: 14px;
  border-bottom: 3px solid var(--ink);
  border-radius: 50%;
}

.canvas-overlay h2 {
  margin: 23px 0 7px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.canvas-overlay p {
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 13px;
}

.drawing-tools {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 11px;
  border: 1px solid #cfc6b7;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 7px 16px rgba(40, 30, 15, 0.06);
  overflow-x: auto;
}

.drawing-tools.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.color-palette {
  display: flex;
  align-items: center;
  gap: 7px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.color-swatch.is-selected {
  border-color: white;
  box-shadow: 0 0 0 2px var(--ink);
}

.color-swatch.white {
  outline-color: #aaa;
}

.tool-separator {
  width: 1px;
  height: 29px;
  flex: 0 0 auto;
  background: #ddd3c3;
}

.brush-size {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.brush-size input {
  width: 85px;
  accent-color: var(--orange);
}

.tool-button {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid #c9bfae;
  border-radius: 9px;
  background: white;
  padding: 0 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.tool-button.is-selected {
  background: var(--ink);
  color: white;
}

.tool-button.danger {
  color: var(--red);
}

.side-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #cfc6b7;
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 9px 24px rgba(55, 39, 16, 0.08);
}

.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 53px;
  border-bottom: 1px solid #ded6c9;
}

.panel-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #827b70;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.panel-tab.is-active {
  color: var(--ink);
}

.panel-tab.is-active::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--orange);
}

.panel-tab span:not(.unread-badge) {
  color: var(--orange-dark);
}

.unread-badge {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--red);
  color: white;
  font-size: 9px;
}

.players-panel,
.chat-panel {
  min-height: 0;
}

.players-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.players-list {
  min-height: 0;
  overflow-y: auto;
  padding: 9px;
}

.player-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 55px;
  padding: 7px 8px;
  border-radius: 12px;
}

.player-row.is-drawer {
  background: #fff4d0;
}

.player-row + .player-row {
  border-top: 1px solid #eee7dc;
}

.player-avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 47% 53% 45% 55%;
  background: var(--avatar, #ffca57);
  font-size: 15px;
  font-weight: 950;
}

.player-name {
  min-width: 0;
}

.player-name strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.player-name small {
  color: var(--muted);
  font-size: 9px;
}

.player-score {
  font-size: 12px;
  font-weight: 900;
}

.kick-button {
  width: 27px;
  height: 27px;
  border: 1px solid #dfc4be;
  border-radius: 8px;
  background: #fff5f3;
  color: var(--red);
  cursor: pointer;
  font-size: 13px;
}

.host-help {
  margin: 0;
  padding: 11px 13px;
  border-top: 1px solid #e7dfd3;
  background: #faf6ed;
  color: var(--muted);
  font-size: 10px;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  padding: 13px;
  overscroll-behavior: contain;
}

.message {
  margin: 0 0 11px;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message strong {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  color: #7d756a;
}

.message.system,
.message.correct {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3eee5;
  color: #645d52;
  font-size: 11px;
  text-align: center;
}

.message.correct {
  background: #e8f7ed;
  color: #167348;
  font-weight: 850;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39px;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid #e2dacd;
}

.chat-form input {
  min-width: 0;
  height: 39px;
  border: 1px solid #cfc6b7;
  border-radius: 10px;
  background: white;
  padding: 0 11px;
  outline: 0;
  font-size: 12px;
}

.chat-form input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12);
}

.chat-form button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--orange);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
}

.create-dialog {
  width: min(500px, calc(100vw - 28px));
  border: 2px solid var(--ink);
  border-radius: 23px;
  background: var(--paper);
  padding: 0;
  box-shadow: 8px 8px 0 var(--ink);
}

.create-dialog::backdrop {
  background: rgba(23, 20, 15, 0.55);
  backdrop-filter: blur(4px);
}

.create-dialog form {
  position: relative;
  padding: 35px;
}

.dialog-close {
  position: absolute;
  right: 17px;
  top: 13px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 28px;
}

.dialog-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 21px;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 44% 56%;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 25px;
}

.create-dialog h2 {
  margin: 8px 0 6px;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.create-dialog > form > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.create-dialog label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 850;
}

.create-dialog input {
  height: 52px;
  border: 1.5px solid #bfb5a5;
  border-radius: 12px;
  background: white;
  padding: 0 14px;
  outline: 0;
}

.create-dialog input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.14);
}

.dialog-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0 24px;
  padding: 12px;
  border-radius: 12px;
  background: #f3eee4;
}

.dialog-note > span {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-size: 20px;
  font-weight: 900;
}

.dialog-note p {
  display: grid;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.dialog-note strong {
  color: var(--ink);
  font-size: 12px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: white;
  box-shadow: 4px 4px 0 var(--orange);
  font-size: 12px;
  font-weight: 750;
  animation: toast-in 180ms ease both;
}

.toast.error {
  background: #7f231a;
  box-shadow: 4px 4px 0 #f28d7f;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 1050px) {
  .hero-card {
    grid-template-columns: 1fr 0.8fr;
  }

  .hero-copy {
    padding-left: 45px;
  }

  .paper-card {
    width: 215px;
    height: 175px;
  }

  .paper-one {
    right: 27%;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
  }

  .rooms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .site-header {
    height: auto;
    min-height: 72px;
    padding: 11px 16px;
  }

  .brand-copy small,
  .connection-pill,
  .nickname-field span,
  .language-field span {
    display: none;
  }

  .nickname-field input {
    width: 112px;
    padding-left: 10px;
  }

  .language-field select {
    min-width: 93px;
  }

  .lobby-view {
    padding: 19px 16px 50px;
  }

  .hero-card {
    display: block;
    min-height: 570px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .hero-copy {
    padding: 38px 25px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .hero-copy > p {
    font-size: 14px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .hero-art {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 220px;
  }

  .paper-card {
    width: 180px;
    height: 145px;
  }

  .paper-one {
    top: 24px;
    left: 10%;
    right: auto;
  }

  .paper-two {
    right: 8%;
    bottom: 17px;
  }

  .cat-doodle {
    transform: scale(0.75);
    transform-origin: top left;
    left: 43px;
    top: 35px;
  }

  .pencil-art {
    width: 170px;
    right: 25%;
  }

  .lobby-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-top: 45px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .game-view {
    padding: 10px 11px 24px;
  }

  .game-topbar {
    min-height: 58px;
  }

  .round-meter > span {
    display: none;
  }

  .prompt-banner {
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .prompt-label {
    width: 100%;
  }

  .prompt-word {
    font-size: 20px;
  }

  .game-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .canvas-panel {
    grid-template-rows: minmax(340px, 62vh) auto;
  }

  .side-panel {
    height: 390px;
  }

  .drawing-tools {
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .site-header {
    gap: 8px;
    padding: 9px 10px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-copy {
    display: none;
  }

  .button-compact {
    padding: 0 7px;
    min-width: 46px;
  }

  .nickname-field input {
    width: 72px;
  }

  .language-field select {
    min-width: 74px;
    max-width: 74px;
    padding-left: 7px;
  }

  .profile-bar {
    gap: 4px;
  }

  .canvas-panel {
    grid-template-rows: minmax(300px, 53vh) auto;
  }

  .drawing-tools {
    gap: 9px;
  }

  .brush-size span {
    display: none;
  }
}
