:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: #101715;
  color: #e9eee9;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid #b7e4bd;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 28px 38px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #c4e4b9;
  color: #152c25;
  border-radius: 12px;
  font-size: 29px;
}
h1 {
  font-size: 22px;
  letter-spacing: -1px;
  margin: 0;
  font-weight: 650;
}
.period {
  color: #b9dcae;
}
.brand p {
  font-size: 12px;
  color: #91a297;
  margin: 3px 0 0;
}
.private-badge {
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid #34443a;
  padding: 8px 12px;
  border-radius: 20px;
  color: #b5c1b5;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #98b09d;
  font-weight: 650;
}
.login-card {
  max-width: 530px;
  margin: 10vh auto;
  padding: 36px;
  background: #18241e;
  border: 1px solid #314438;
  border-radius: 22px;
}
.login-card h2 {
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -1.5px;
  font-weight: 500;
}
.login-card > p {
  color: #a7b5a9;
  font-size: 14px;
}
.login-card .eyebrow {
  font-size: 10px;
}
.login-card label {
  display: block;
  font-size: 12px;
  margin: 26px 0 8px;
}
.key-row {
  display: flex;
  gap: 8px;
}
.key-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #4b6051;
  background: #102019;
  border-radius: 8px;
  padding: 12px;
  color: white;
}
.key-row button {
  white-space: nowrap;
  background: #c4e4b9;
  color: #173021;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 650;
}
.login-card .login-note {
  font-size: 11px;
  margin-top: 24px;
  color: #849788;
}
#login-error {
  color: #ffc6b6;
}
.board-error {
  padding: 10px 14px;
  border: 1px solid #735b38;
  border-radius: 8px;
  background: #30291d;
  color: #f0d7a9;
  font-size: 12px;
  line-height: 1.5;
}
.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#connection {
  font-size: 12px;
  color: #bdc8bd;
  margin-left: auto;
}
#toggle-tools {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #435b49;
  border-radius: 8px;
  background: #263b2e;
  color: #e4f0dc;
  font-size: 12px;
  white-space: nowrap;
}
html:has(#workspace:not([hidden])),
body:has(#workspace:not([hidden])) {
  overflow: hidden;
  overscroll-behavior: none;
}
main:has(#workspace:not([hidden])) {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
#workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.board-viewport {
  flex: 1;
  min-height: 56px;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border: 1px solid #40574a;
  background: #101715;
}
.board-viewport:focus-visible {
  outline: 2px solid #b7e4bd;
}
.board-stage {
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
}
canvas {
  display: block;
  height: auto;
  background-color: #183e33;
  background-image: radial-gradient(#c6e5d014 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  outline: 1px solid #78977e;
  touch-action: none;
  cursor: crosshair;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #1e2c24;
  border: 1px solid #364a3d;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.toolbar button {
  border: 1px solid transparent;
  color: #a5b6a6;
  background: transparent;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  min-height: 36px;
}
.toolbar button:hover {
  background: #344c3d;
  color: #f3f8ee;
}
.toolbar button[aria-pressed='true']:not(.swatch) {
  background: #c4e4b9;
  color: #193324;
}
.tool-group {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tool-group + .tool-group {
  border-left: 1px solid #435345;
  padding-left: 16px;
}
.toolbar .swatch {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 5px solid #1e2c24;
  border-radius: 50%;
  padding: 0;
  outline: 1px solid transparent;
}
.toolbar .swatch[aria-pressed='true'] {
  outline-color: #d9ead2;
}
.toolbar .swatch:hover {
  outline-color: #78977e;
}
.black {
  background: #000 !important;
}
.white {
  background: #fff !important;
}
.red {
  background: #ef4444 !important;
}
.blue {
  background: #3b82f6 !important;
}
.green {
  background: #22c55e !important;
}
.yellow {
  background: #facc15 !important;
}
.width-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #b4c2b3;
}
.width-control input {
  width: 90px;
  accent-color: #c4e4b9;
}
.width-control output {
  min-width: 19px;
  font-variant-numeric: tabular-nums;
}
.view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.view-controls button {
  min-height: 44px;
  padding: 6px 12px;
  background: #263b2e;
  border: 1px solid #435b49;
  border-radius: 7px;
  color: #e4f0dc;
  font-size: 14px;
}
.view-controls button[aria-pressed='true'] {
  background: #c4e4b9;
  color: #193324;
}
.view-controls button:disabled {
  opacity: 0.55;
  cursor: default;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.toolbar .clear-button {
  margin-left: auto;
  color: #d9b3a0;
}
canvas.erasing {
  cursor: cell;
}
canvas.panning {
  cursor: grab;
}
canvas.dragging {
  cursor: grabbing;
}
@media (max-width: 600px) {
  .toolbar {
    gap: 12px;
    padding: 10px;
  }
  .tool-group + .tool-group {
    padding-left: 10px;
  }
  .toolbar .swatch {
    width: 26px;
    height: 26px;
    min-height: 26px;
  }
  .width-control {
    flex: 1;
  }
  .width-control input {
    flex: 1;
    max-width: 180px;
  }
}
@media (max-width: 600px) {
  main {
    padding: 20px 14px;
  }
  .masthead {
    margin-bottom: 22px;
  }
  .brand p {
    font-size: 10px;
  }
  .private-badge {
    font-size: 9px;
    padding: 7px 9px;
  }
  .login-card {
    padding: 24px;
    margin: 7vh auto;
  }
  .login-card h2 {
    font-size: 31px;
  }
  .key-row {
    flex-wrap: wrap;
  }
  .key-row button {
    width: 100%;
  }
}
@media (max-height: 600px), (max-width: 600px) {
  main:has(#workspace:not([hidden])) {
    padding: 8px 6px;
  }
  main:has(#workspace:not([hidden])) .masthead {
    display: none;
  }
  .board-heading {
    gap: 6px;
    margin-bottom: 3px;
  }
  .toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    flex-shrink: 0;
    gap: 10px;
    padding: 2px 8px;
    margin-bottom: 4px;
  }
  .toolbar > * {
    flex: none;
    white-space: nowrap;
  }
  .board-heading .eyebrow {
    display: none;
  }
  .view-controls {
    gap: 4px;
    margin-bottom: 4px;
  }
  .view-controls button {
    padding-inline: 6px;
    font-size: 12px;
  }
}
