:root {
  color-scheme: dark;
  --bg: #181a23;
  --deep: #15171f;
  --panel: #1b1d27;
  --surface: #242632;
  --line: #2d303d;
  --text: #f2f1f7;
  --muted: #a7a9ba;
  --lime: #d7fa77;
  --purple: #c9bcff;
  --header: 76px;
  --rail: 72px;
  --sidebar: 280px;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--deep);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; overflow: hidden; min-width: 290px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid #9875ff; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .33; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.topbar { height: var(--header); display: flex; align-items: center; gap: 25px; padding: 0 22px; background: #191b24; border-bottom: 1px solid var(--line); position: relative; z-index: 4; }
.brand { display: flex; align-items: center; text-align: left; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 41px; height: 41px; border-radius: 12px; color: #242c15; background: var(--lime); display: grid; place-items: center; box-shadow: inset 0 0 0 1px #efffc233; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 19px; line-height: 1.1; font-weight: 800; letter-spacing: -.055em; }
.brand-copy strong span { color: var(--lime); }
.brand-copy small { color: #a6a8b7; font-size: 9px; font-weight: 800; letter-spacing: .102em; white-space: nowrap; }
.top-divider { height: 34px; width: 1px; background: var(--line); }
.top-board { display: grid; gap: 3px; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.breadcrumb svg { width: 14px; height: 14px; }
.title-button { display: flex; align-items: center; min-width: 0; gap: 7px; color: #f7f6fb; text-align: left; font-size: 1rem; font-weight: 800; }
.title-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-button svg { width: 15px; height: 15px; color: #a0a1b0; }
.top-actions { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.sync { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-size: .76rem; font-weight: 700; color: #b0b3c2; padding: 0 7px; }
.sync i, .demo-label span { width: 7px; height: 7px; background: #c9b9ff; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.sync[data-state="saved"] i { background: #a8e078; }
.sync[data-state="saving"] i { background: #f9d27f; }
.sync[data-state="error"] i { background: #ff969f; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--lime); color: #252b16; border-radius: 10px; height: 42px; padding: 0 15px; font-weight: 800; font-size: .875rem; white-space: nowrap; }
.primary:hover { background: #e4ff9d; }
.primary svg { width: 19px; height: 19px; stroke-width: 1.9; }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #382f52; color: #dbd0ff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.profile { margin-left: 1px; border: 1px solid #51466a; }
.profile:hover { background: #4a3b6a; }
.workspace { display: flex; height: calc(100dvh - var(--header)); min-height: 0; }
.toolrail { width: var(--rail); flex: 0 0 var(--rail); background: var(--deep); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0 13px; position: relative; z-index: 3; border-right: 1px solid var(--line); }
.tool { width: 43px; height: 42px; min-height: 31px; border-radius: 10px; color: #b8bacb; display: grid; place-items: center; position: relative; }
.tool svg { width: 21px; height: 21px; }
.tool:hover:not(:disabled) { background: #2a2d3a; color: white; }
.tool.active, .tool.active:hover { background: var(--lime); color: #252c17; }
.tool.active svg { stroke-width: 1.85; }
.rail-line { width: 24px; height: 1px; flex: 0 0 1px; background: var(--line); margin: 4px 0; }
.rail-help { margin-top: auto; }
.shape-tool i { position: absolute; bottom: 7px; right: 7px; width: 4px; height: 4px; border-bottom: 1px solid; border-right: 1px solid; }
.tool[data-tip]:hover:not(:disabled)::after { content: attr(data-tip); position: absolute; top: 50%; transform: translateY(-50%); left: calc(100% + 13px); padding: 7px 9px; background: #242531; border: 1px solid #3c3e4c; border-radius: 7px; color: #fff; white-space: nowrap; font-size: .72rem; z-index: 7; pointer-events: none; box-shadow: 0 4px 9px #1a1b2b30; }
.canvas-shell { position: relative; isolation: isolate; overflow: hidden; flex: 1; min-width: 0; background: #f6f5f2; color-scheme: light; color: #28283b; }
#canvas { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -3px; }
.canvas-top, .canvas-bottom { position: absolute; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.canvas-top { top: 16px; }
.canvas-bottom { bottom: 17px; align-items: end; }
.canvas-top > *, .canvas-bottom > * { pointer-events: auto; }
.demo-label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #dbd6e8; border-radius: 7px; background: #f1ecff; color: #624ba4; font-weight: 800; font-size: .64rem; letter-spacing: .085em; line-height: 1.2; }
.demo-label span { background: #8d6cdf; width: 6px; height: 6px; }
.demo-label.live { color: #546345; background: #f1f5e9; border-color: #dee3d5; }
.demo-label.live span { background: #809d52; }
.canvas-actions { display: flex; gap: 4px; padding: 3px; background: #ffffffed; border: 1px solid #e1dfdf; border-radius: 10px; box-shadow: 0 3px 14px #2530470b; }
.canvas-btn { height: 34px; width: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: #595a6c; flex: 0 0 auto; }
.canvas-btn:hover, .canvas-btn.is-on { background: #f0eef6; color: #5b4596; }
.canvas-btn svg { width: 18px; height: 18px; }
.palette, .view-controls { display: flex; align-items: center; background: #fffffff5; border: 1px solid #e0dedf; border-radius: 12px; padding: 5px; box-shadow: 0 4px 14px #242b4010; }
.palette { padding-left: 8px; gap: 5px; }
.color-picks { display: flex; align-items: center; gap: 4px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent; }
.swatch::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--swatch); }
.swatch:hover, .swatch.selected { border-color: var(--swatch); }
.palette-line { height: 20px; width: 1px; background: #e7e4ea; margin: 0 4px; }
.stroke { width: 46px; gap: 6px; }
.stroke svg { width: 13px; height: 13px; }
#stroke-dot { width: 11px; height: 3px; border-radius: 3px; background: #4c465e; }
.zoom-value { min-width: 48px; height: 34px; color: #42435a; font-size: .78rem; font-weight: 800; border-radius: 6px; }
.zoom-value:hover { background: #f0eef6; }
.sidebar { width: var(--sidebar); flex: 0 0 var(--sidebar); min-width: 0; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); overflow: auto; }
.sidebar.closed { display: none; }
.side-head { display: flex; align-items: center; gap: 11px; padding: 22px 17px 19px; border-bottom: 1px solid var(--line); }
.side-head h2, .section-title h3, .side-head p, .side-footer p { margin: 0; }
.side-head h2 { font-size: .97rem; font-weight: 800; letter-spacing: -.025em; }
.side-head p { margin-top: 3px; font-size: .75rem; color: var(--muted); }
.side-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #d8caff; background: #342d49; border: 1px solid #49405d; border-radius: 10px; flex: 0 0 auto; }
.side-icon svg { width: 19px; height: 19px; }
.quiet-icon { width: 30px; height: 30px; border-radius: 7px; color: #a5a8bb; display: grid; place-items: center; flex: 0 0 auto; }
.quiet-icon svg { width: 18px; height: 18px; }
.quiet-icon:hover { background: #303342; color: white; }
.side-head .quiet-icon, .section-title .quiet-icon { margin-left: auto; }
.side-section { padding: 17px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; min-height: 24px; }
.section-title > svg { width: 17px; height: 17px; color: #afaac9; }
.section-title h3 { font-size: .86rem; font-weight: 800; }
.count { margin-left: auto; display: grid; place-items: center; min-width: 23px; height: 22px; padding: 0 5px; border-radius: 6px; background: #2b2d3a; color: #c9c9d8; font-size: .7rem; font-weight: 800; }
.members, .boards { display: grid; gap: 7px; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.member { display: flex; align-items: center; gap: 9px; padding: 4px 3px; min-width: 0; }
.member .avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; font-size: .72rem; }
.member-info { min-width: 0; }
.member-info strong, .board-item strong { display: block; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size: .81rem; font-weight: 800; }
.member-info small, .board-item small { color: var(--muted); font-size: .7rem; display: block; margin-top: 2px; }
.member-state { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #6d7187; flex: 0 0 auto; }
.member-state.online { background: #b3e777; }
.side-button { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #3a3d4d; border-radius: 9px; margin-top: 14px; color: #e0dfeb; font-size: .79rem; font-weight: 800; }
.side-button svg { width: 16px; height: 16px; color: #c7b5ff; }
.side-button:hover { background: #292b39; border-color: #5b5570; }
.board-item { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; min-width: 0; border-radius: 9px; border: 1px solid #373948; background: #242632; padding: 9px; }
.board-item.selected { background: #2b293c; border-color: #4e456b; }
.board-item:hover { border-color: #7a659b; }
.board-item > span:last-child { min-width: 0; }
.board-thumb { width: 36px; height: 32px; border-radius: 6px; display: grid; place-items: center; background-color: #e9e1ff; color: #6248a8; background-image: radial-gradient(#b3a5db 1px, transparent 1px); background-size: 6px 6px; flex: 0 0 auto; }
.board-thumb svg { width: 19px; height: 19px; stroke-width: 1.8; }
.new-board { border-style: dashed; color: #bfc2d3; }
.side-footer { padding: 16px 17px; display: flex; align-items: center; gap: 9px; margin-top: auto; color: #c7c9d7; }
.footer-icon { width: 31px; height: 31px; flex: 0 0 auto; background: #292d3a; color: #b2b6cb; border-radius: 8px; display: grid; place-items: center; }
.footer-icon svg { width: 17px; height: 17px; }
.side-footer strong { font-size: .7rem; font-weight: 800; }
.side-footer p { font-size: .66rem; color: var(--muted); margin-top: 3px; }
.floating { display: grid; position: absolute; padding: 5px; min-width: 145px; background: #fff; border: 1px solid #e4e1e9; border-radius: 10px; box-shadow: 0 8px 26px #25253f21; z-index: 5; }
.floating button { display: flex; text-align: left; align-items: center; gap: 8px; border-radius: 6px; padding: 8px; white-space: nowrap; color: #37364a; font-size: .8rem; font-weight: 700; }
.floating button:hover, .floating button.selected { background: #eee9fb; }
.floating svg { width: 18px; height: 18px; }
.shape-popup { left: 8px; }
.board-popup { right: 18px; top: 63px; }
.stroke-popup { bottom: 68px; left: 161px; min-width: 92px; }
.stroke-popup span { display: inline-block; width: 19px; border-radius: 9px; background: #706080; }
.bg-popup { bottom: 68px; right: 41px; }
.empty-board { position: absolute; width: min(335px, 85%); top: 50%; left: 50%; transform: translate(-50%,-53%); text-align: center; pointer-events: none; }
.empty-icon { width: 63px; height: 63px; margin: auto; border-radius: 18px; background: #eee5ff; color: #8251c8; display: grid; place-items: center; }
.empty-icon svg { width: 28px; height: 28px; }
.empty-board h2 { margin: 14px 0 6px; font-size: 1.4rem; letter-spacing: -.05em; }
.empty-board p { margin: 0; color: #5f5e73; font-size: .9rem; }
.empty-board button { margin-top: 14px; pointer-events: auto; background: #29263a; color: #fcfaff; padding: 8px 14px; border-radius: 8px; font-weight: 800; font-size: .8rem; }
.dialog { border: 1px solid #3c3e51; border-radius: 19px; background: #21232f; color: var(--text); box-shadow: 0 24px 80px #10101b99; padding: 26px; width: min(440px, calc(100vw - 32px)); max-height: min(90dvh, 680px); }
.dialog::backdrop { background: #1416229c; backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 12px; top: 12px; }
.dialog h2 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -.04em; margin: 10px 24px 7px 0; }
.dialog p { margin: 0 0 16px; color: #c0c2d1; font-size: .87rem; line-height: 1.52; }
.dialog form { display: grid; gap: 13px; }
.dialog label { display: grid; gap: 6px; font-size: .8rem; font-weight: 800; }
.dialog input, .dialog textarea { width: 100%; padding: 10px 11px; border: 1px solid #46485b; border-radius: 8px; background: #191b25; color: white; outline: 0; font-size: .95rem; }
.dialog input:focus, .dialog textarea:focus { border-color: #b6a0fa; }
.dialog textarea { min-height: 110px; resize: vertical; }
.dialog .primary { width: 100%; margin-top: 3px; }
.dialog .form-error { color: #ffafb7; margin: 0; }
.text-button { color: #d9c8ff; font-weight: 800; font-size: .83rem; margin-top: 15px; }
.text-button:hover { text-decoration: underline; }
.copy-row { display: flex; gap: 7px; }
.copy-row .primary { width: 46px; flex: 0 0 46px; padding: 0; margin: 0; }
.help-list { display: grid; grid-template-columns: 1fr auto; gap: 11px 10px; font-size: .84rem; margin: 0; align-items: center; }
.help-list dd { margin: 0; display: flex; justify-content: flex-end; gap: 3px; }
kbd { font: inherit; font-size: .72rem; color: #e6deff; background: #382e53; padding: 3px 6px; border-radius: 5px; }
.toast { position: fixed; bottom: 75px; left: 50%; transform: translateX(-50%); z-index: 8; color: #f6f4ff; background: #282839; border: 1px solid #4b475d; border-radius: 9px; padding: 9px 14px; box-shadow: 0 5px 16px #23223538; font-size: .84rem; text-align: center; max-width: min(85vw, 440px); }
@media (max-width: 1100px) { :root { --sidebar: 247px; --rail: 63px; } .topbar { gap: 17px; } .side-head, .side-section, .side-footer { padding-left: 13px; padding-right: 13px; } }
@media (max-width: 760px) {
  :root { --header: 62px; --rail: 53px; }
  .topbar { padding: 0 10px; gap: 9px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 9px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-copy, .sync, .top-divider { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .primary { padding: 0 9px; font-size: .77rem; height: 36px; }
  .profile { width: 32px; height: 32px; flex-basis: 32px; }
  .title-button { font-size: .82rem; gap: 2px; }
  .breadcrumb { font-size: .65rem; }
  .breadcrumb svg { width: 12px; height: 12px; }
  .toolrail { padding-top: 9px; gap: 3px; }
  .tool { width: 36px; height: 35px; }
  .tool svg { width: 18px; height: 18px; }
  .rail-line { margin: 2px 0; }
  .sidebar { position: absolute; inset: var(--header) 0 0 auto; z-index: 2; box-shadow: -10px 0 22px #15152430; width: min(var(--sidebar), 73vw); }
  .canvas-top, .canvas-bottom { left: 9px; right: 9px; }
  .canvas-top { top: 9px; }
  .canvas-bottom { bottom: 9px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .canvas-btn { width: 30px; height: 30px; }
  .stroke { width: 36px; }
  .stroke-popup { left: 130px; bottom: 93px; }
  .bg-popup { left: 9px; right: auto; bottom: 55px; }
}
@media (max-width: 385px) { .top-actions .primary span { display: none; } }
@media (max-height: 645px) and (min-width: 761px) { .toolrail { padding: 8px 0; gap: 2px; } .tool { height: 37px; } .rail-line { margin: 2px 0; } }
