* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #d9dde3;
  color: #111827;
  font: 15px/1.3 system-ui, sans-serif;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #c3c9d2;
}

.group { display: flex; align-items: center; gap: 4px; }

button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #c3c9d2;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button[aria-pressed="true"] { background: #111827; border-color: #111827; color: #fff; }

.swatch { width: 32px; min-height: 32px; padding: 0; border-radius: 50%; border: 3px solid #fff; }
.swatch[data-color="#111827"] { background: #111827; }
.swatch[data-color="#2563eb"] { background: #2563eb; }
.swatch[data-color="#dc2626"] { background: #dc2626; }
.swatch[data-color="#16a34a"] { background: #16a34a; }
.swatch[data-color="#ea580c"] { background: #ea580c; }
.swatch[data-color="#9333ea"] { background: #9333ea; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #111827; }

#status { margin: 0 0 0 auto; color: #4b5563; }

main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* app.js sizes this to the largest 16:10 box that fits */
#board {
  position: relative;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgb(0 0 0 / 18%);
}

canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6px; }

#live { touch-action: none; cursor: crosshair; }

#typing {
  position: absolute;
  z-index: 1;
  width: 16em;
  max-width: 100%;
  padding: 0 4px;
  border: 1px dashed #6b7280;
  background: rgb(255 255 255 / 92%);
  font-family: system-ui, sans-serif;
}
