@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --dw-orange: #ff5a1f;
  --dw-ink: #171717;
  --dw-paper: #f5f3ef;
  --dw-panel: #ffffff;
  --dw-line: #dedbd5;
  --dw-muted: #77746e;
  --dw-shadow: 0 10px 35px rgba(25, 20, 14, .12);
  --dw-topbar: 66px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: "Manrope", Arial, sans-serif; color: var(--dw-ink); background: var(--dw-paper); }
button, input { font: inherit; }
button { color: inherit; }
.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; }

.dw-topbar {
  position: fixed; z-index: 100; inset: 0 0 auto; height: var(--dw-topbar);
  display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; align-items: center; gap: 22px;
  padding: 0 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--dw-line);
  box-shadow: 0 3px 18px rgba(18,16,13,.05); backdrop-filter: blur(16px);
}
.dw-brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.dw-brand svg { width: 25px; height: auto; fill: none; stroke: var(--dw-orange); stroke-width: 2.4; stroke-linejoin: round; }
.dw-brand > span { font-size: 19px; font-weight: 800; letter-spacing: -.05em; }
.dw-brand > span span { color: var(--dw-orange); }
.dw-brand small {
  margin-left: 4px; padding: 4px 7px; border-radius: 99px; background: #fff0e9; color: #b63b0c;
  font: 9px "DM Mono", monospace; letter-spacing: .05em; text-transform: uppercase;
}
.dw-board-name { justify-self: center; width: min(390px, 100%); }
.dw-board-name input {
  width: 100%; padding: 8px 12px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; text-align: center; font-weight: 700; outline: none;
}
.dw-board-name input:hover, .dw-board-name input:focus { border-color: var(--dw-line); background: white; }
.dw-save-state { display: flex; align-items: center; gap: 7px; color: var(--dw-muted); font: 10px "DM Mono", monospace; white-space: nowrap; }
.dw-save-state span { width: 7px; height: 7px; border-radius: 50%; background: #44aa6b; }
.dw-save-state.saving span { background: #e5a52e; }
.dw-save-state.offline span { background: #cf4931; }
.dw-collaboration { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.dw-participants {
  display: flex; flex-direction: row-reverse; justify-content: flex-start; min-width: 28px;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.dw-participant {
  width: 28px; height: 28px; display: grid; place-items: center; margin-left: -7px;
  border: 2px solid white; border-radius: 50%; color: white; font-size: 10px; font-weight: 800;
  box-shadow: 0 2px 7px rgba(0,0,0,.12);
}
.dw-top-actions { display: flex; align-items: center; gap: 8px; }
.dw-icon-button, .dw-secondary-button, .dw-share-button {
  height: 38px; border: 1px solid var(--dw-line); border-radius: 7px; background: white; cursor: pointer;
}
.dw-icon-button { width: 38px; display: grid; place-items: center; }
.dw-icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dw-secondary-button, .dw-share-button { padding: 0 16px; font-size: 12px; font-weight: 700; }
.dw-share-button { border-color: var(--dw-ink); background: var(--dw-ink); color: white; }
.dw-icon-button:hover, .dw-secondary-button:hover { border-color: #aaa69f; background: #faf9f7; }
.dw-share-button:hover { background: var(--dw-orange); border-color: var(--dw-orange); }

.dw-workspace { position: fixed; inset: var(--dw-topbar) 0 0; }
.dw-viewport {
  position: absolute; inset: 0; overflow: hidden; background: #ebe9e4; cursor: default; outline: none;
}
.dw-viewport.tool-hand, .dw-viewport.is-panning { cursor: grab; }
.dw-viewport.is-panning { cursor: grabbing; }
.dw-viewport.tool-sticky, .dw-viewport.tool-text, .dw-viewport.tool-rectangle,
.dw-viewport.tool-circle, .dw-viewport.tool-connector { cursor: crosshair; }
.dw-canvas {
  position: absolute; z-index: 1; left: 0; top: 0; width: 4000px; height: 3000px;
  transform-origin: 0 0; background-color: #f8f7f4;
  background-image: radial-gradient(circle, #cbc8c1 1px, transparent 1px);
  background-size: 24px 24px; box-shadow: 0 0 0 1px rgba(0,0,0,.04);
  will-change: transform;
}
.dw-connectors, .dw-object-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.dw-connectors { z-index: 1; overflow: visible; pointer-events: none; }
.dw-connectors line { stroke: #4f4b45; stroke-width: 3; marker-end: url(#arrowhead); }
.dw-object-layer { z-index: 2; pointer-events: none; }
.board-object {
  position: absolute; display: flex; align-items: center; justify-content: center;
  padding: 18px; color: #202020; pointer-events: auto; cursor: move; user-select: none;
  overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.32;
  transition: box-shadow .12s, outline-color .12s;
}
.board-object:hover { box-shadow: 0 8px 25px rgba(30,25,18,.13); }
.board-object.selected { z-index: 20 !important; outline: 3px solid var(--dw-orange); outline-offset: 4px; box-shadow: 0 10px 32px rgba(30,25,18,.18); }
.board-object.connect-source { outline: 4px solid #1e73d8; outline-offset: 5px; }
.board-object.editing { cursor: text; user-select: text; outline: 3px solid #1e73d8; }
.board-object.sticky { align-items: flex-start; justify-content: flex-start; padding: 24px; font-size: 18px; font-weight: 600; box-shadow: 0 8px 18px rgba(43,37,28,.14); }
.board-object.sticky::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px;
  background: linear-gradient(135deg, rgba(0,0,0,.08) 0 49%, rgba(255,255,255,.36) 51% 100%);
}
.board-object.text { justify-content: flex-start; padding: 4px; background: transparent !important; font-size: 30px; font-weight: 700; letter-spacing: -.04em; }
.board-object.rectangle { border: 2px solid rgba(30,30,30,.55); border-radius: 8px; background: white; font-size: 16px; font-weight: 700; text-align: center; }
.board-object.circle { border: 2px solid rgba(30,30,30,.55); border-radius: 50%; background: white; font-size: 15px; font-weight: 700; text-align: center; }
.board-object.image { padding: 0; background: white; border: 1px solid rgba(30,30,30,.12); border-radius: 5px; }
.board-object.image img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.board-object [contenteditable="true"] { width: 100%; height: 100%; outline: none; cursor: text; user-select: text; }

.dw-toolbar {
  position: absolute; z-index: 50; left: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 5px; padding: 7px;
  background: rgba(255,255,255,.97); border: 1px solid var(--dw-line); border-radius: 12px; box-shadow: var(--dw-shadow);
}
.dw-tool {
  width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer;
}
.dw-tool:hover { background: #f2f0eb; }
.dw-tool.active { background: var(--dw-ink); color: white; }
.dw-tool.danger:hover { background: #fff0ec; color: #bd3718; }
.dw-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dw-tool-divider { width: 28px; height: 1px; margin: 3px auto; background: var(--dw-line); }

.dw-inspector {
  position: absolute; z-index: 40; right: 18px; top: 18px; width: 230px; min-height: 145px;
  padding: 20px; background: rgba(255,255,255,.97); border: 1px solid var(--dw-line);
  border-radius: 12px; box-shadow: var(--dw-shadow); backdrop-filter: blur(15px);
}
.dw-inspector-empty span { font-size: 12px; font-weight: 800; }
.dw-inspector-empty p { margin: 9px 0 0; color: var(--dw-muted); font-size: 12px; line-height: 1.5; }
.dw-inspector-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.dw-inspector-heading span, .dw-property-label { color: var(--dw-muted); font: 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .09em; }
.dw-inspector-heading strong { display: block; margin-top: 4px; font-size: 14px; text-transform: capitalize; }
.dw-inspector-heading button { width: 27px; height: 27px; border: 0; border-radius: 6px; background: #f2f0eb; cursor: pointer; font-size: 19px; line-height: 1; }
.dw-colours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 10px 0 22px; }
.dw-colours button { aspect-ratio: 1; border: 1px solid #bdb9b2; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.dw-colours button.active { outline: 2px solid var(--dw-ink); outline-offset: 2px; }
.dw-property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dw-property-grid label { color: var(--dw-muted); font: 9px "DM Mono", monospace; }
.dw-property-grid input { width: 100%; margin-top: 5px; padding: 8px; border: 1px solid var(--dw-line); border-radius: 6px; font: 11px "DM Mono", monospace; outline: none; }
.dw-property-grid input:focus { border-color: var(--dw-orange); }
.dw-inspector-button { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid var(--dw-line); border-radius: 6px; background: white; cursor: pointer; font-size: 11px; font-weight: 700; }

.dw-zoom-controls {
  position: absolute; z-index: 30; left: 18px; bottom: 18px; display: flex; align-items: center;
  overflow: hidden; background: white; border: 1px solid var(--dw-line); border-radius: 9px; box-shadow: 0 5px 18px rgba(30,25,18,.1);
}
.dw-zoom-controls button { width: 38px; height: 36px; border: 0; border-right: 1px solid var(--dw-line); background: white; cursor: pointer; }
.dw-zoom-controls button:last-child { border-right: 0; }
.dw-zoom-controls button:hover { background: #f4f2ed; }
.dw-zoom-controls .dw-zoom-value { width: 58px; font: 10px "DM Mono", monospace; }
.dw-zoom-controls svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dw-shortcut-hint {
  position: absolute; z-index: 20; left: 50%; bottom: 22px; transform: translateX(-50%);
  padding: 8px 12px; border-radius: 99px; background: rgba(255,255,255,.88); color: var(--dw-muted);
  font: 9px "DM Mono", monospace; white-space: nowrap; pointer-events: none;
}
.dw-room-note {
  position: absolute; z-index: 20; right: 18px; bottom: 22px; padding: 8px 11px;
  border-radius: 7px; background: rgba(255,255,255,.88); color: var(--dw-muted);
  font: 9px "DM Mono", monospace; pointer-events: none;
}
.dw-canvas-hint {
  position: absolute; z-index: 10; left: 50%; top: 50%; transform: translate(-50%,-50%);
  display: none; flex-direction: column; align-items: center; gap: 6px; color: var(--dw-muted); pointer-events: none;
}
.dw-canvas-hint strong { color: var(--dw-ink); font-size: 20px; }
.dw-canvas-hint span { font-size: 12px; }
.dw-canvas-hint.visible { display: flex; }
.dw-toast {
  position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  max-width: min(430px, calc(100vw - 30px)); padding: 11px 16px; border-radius: 8px;
  background: var(--dw-ink); color: white; font-size: 12px; box-shadow: var(--dw-shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.dw-toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .dw-topbar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .dw-save-state { display: none; }
  .dw-board-name { justify-self: stretch; }
  .dw-inspector { display: none; }
  .dw-brand small, .dw-secondary-button { display: none; }
  .dw-shortcut-hint { display: none; }
  .dw-room-note { right: 12px; bottom: 22px; max-width: 210px; }
}

@media (max-width: 600px) {
  :root { --dw-topbar: 58px; }
  .dw-topbar { padding: 0 10px; grid-template-columns: auto minmax(0,1fr) auto; }
  .dw-brand > span { font-size: 17px; }
  .dw-brand svg { width: 22px; }
  .dw-board-name input { padding: 7px 5px; font-size: 12px; text-align: left; }
  .dw-top-actions { gap: 5px; }
  .dw-top-actions .dw-icon-button { display: none; }
  .dw-share-button { height: 34px; padding: 0 12px; }
  .dw-toolbar {
    left: 10px; right: 10px; top: auto; bottom: 10px; transform: none;
    flex-direction: row; justify-content: flex-start; overflow-x: auto; gap: 3px; padding: 6px;
  }
  .dw-tool { flex: 0 0 40px; width: 40px; height: 40px; }
  .dw-tool-divider { flex: 0 0 1px; width: 1px; height: 28px; margin: 6px 3px; }
  .dw-zoom-controls { left: 10px; bottom: 68px; }
  .dw-toast { bottom: 122px; }
  .dw-room-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
