@font-face {
  font-family: Inter;
  src: local("Inter");
}
@font-face {
  font-family: Inter;
  src: local("Arial");
  unicode-range: U+0400-04FF;
}
:root {
  font-family:
    Inter,
    Segoe UI,
    sans-serif;
  color-scheme: dark;
  --bg: #101017;
  --sidebar: #14141f;
  --panel: #191923;
  --panel2: #20202d;
  --line: #ffffff10;
  --muted: #8e8caa;
  --text: #efedf8;
  --accent: #a88aff;
  --accent-rgb: 168, 138, 255;
  --canvas: #111119;
  --radius: 16px;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shell {
  display: flex;
  height: 100dvh;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 32px;
  font-size: 1.6429rem;
  font-weight: 750;
  letter-spacing: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #bf9bff, #7660e8);
  color: white;
  border-radius: 11px;
  width: 35px;
  height: 35px;
  box-shadow: 0 0 28px #9b73fa30;
  letter-spacing: -3px;
  padding-right: 3px;
  font-size: 1.7143rem;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
}
.nav-button.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.11);
}
.nav-button:hover {
  background: var(--panel2);
}
.nav-count {
  margin-left: auto;
  font-size: 0.7857rem;
  opacity: 0.7;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7143rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 35px 11px 12px;
}
.board-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8571rem;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 8px;
}
.board-nav.active {
  background: var(--panel2);
  color: var(--text);
}
.board-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
}
.sidebar-bottom {
  margin-top: auto;
}
.stage-filters {
  display: flex;
  gap: 3px;
  margin: 0 9px 10px;
}
.stage-filters button {
  font-size: 0.6429rem;
  color: var(--muted);
  border-radius: 5px;
  padding: 5px 7px;
}
.stage-filters button.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}
.stage-navigation {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  margin-bottom: 20px;
}
.stage-nav {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 7px;
  text-align: left;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.7143rem;
  border-radius: 7px;
}
.stage-nav:hover {
  background: var(--panel2);
  color: var(--text);
}
.stage-nav > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-nav small {
  margin-left: auto;
  font-size: 0.6429rem;
}
.focused-block {
  outline: 2px solid var(--block-color);
  outline-offset: 4px;
}
.local-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7857rem;
  color: var(--muted);
  padding: 16px 12px;
  border-top: 1px solid var(--line);
}
.local-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79dab5;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 2px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #a88aff18;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.8571rem;
  font-weight: 700;
}
.profile strong {
  font-size: 0.8571rem;
  font-weight: 500;
}
.profile small {
  display: block;
  font-size: 0.7143rem;
  color: var(--muted);
  margin-top: 3px;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 73px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 34px;
  gap: 16px;
}
.breadcrumb {
  font-size: 0.8571rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 11px;
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 500;
}
.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.save-status {
  font-size: 0.7143rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.save-status.error {
  color: #ff9caa;
}
.save-status svg {
  width: 14px;
  height: 14px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  color: var(--text);
  background: var(--panel2);
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  min-height: 39px;
  padding: 9px 15px;
  font-size: 0.8571rem;
  font-weight: 600;
}
.primary {
  background: var(--accent);
  color: #181123;
  box-shadow: 0 3px 20px rgba(var(--accent-rgb), 0.13);
}
.primary:hover {
  filter: brightness(1.08);
}
.secondary {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
}
.danger {
  background: #ff6a8118;
  color: #ff9cac;
}
.page-heading {
  padding: 30px 36px 25px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.eyebrow {
  font-size: 0.7143rem;
  letter-spacing: 1.7px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-heading h1 {
  font-size: 2rem;
  letter-spacing: -1px;
  font-weight: 650;
}
.page-heading p {
  font-size: 0.8571rem;
  color: var(--muted);
  margin-top: 9px;
  line-height: 1.6;
}
.heading-buttons {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-top: 0;
}
.board-title-button {
  text-align: left;
  padding: 0;
}
.board-title-button:hover h1 {
  color: var(--accent);
}
.progress-card {
  display: flex;
  align-items: center;
  gap: 17px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 13px 18px;
  min-width: 195px;
}
.progress-ring {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--p) * 1%),
    var(--panel2) 0
  );
  padding: 4px;
  display: grid;
  place-items: center;
}
.progress-ring span {
  display: grid;
  place-items: center;
  background: var(--panel);
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-size: 0.7143rem;
  font-weight: 600;
}
.progress-card small {
  font-size: 0.7143rem;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.progress-card strong {
  font-size: 0.8571rem;
  font-weight: 500;
}
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 36px 18px;
}
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffffff04;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 10px;
}
.tab {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.7857rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tab.active {
  background: var(--panel2);
  color: var(--text);
  box-shadow: 0 2px 4px #0002;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box svg {
  position: absolute;
  left: 11px;
  color: var(--muted);
  width: 15px;
  height: 15px;
}
.search-box input {
  padding: 9px 12px 9px 34px;
  font-size: 0.7857rem;
  width: 210px;
  background: var(--panel);
  border-color: var(--line);
}
.canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--canvas);
  overflow: hidden;
  isolation: isolate;
}
.canvas-wrap.grid {
  background-image: radial-gradient(#77738a38 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}
.viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.viewport.panning {
  cursor: grabbing;
}
.world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.connections {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.block {
  position: absolute;
  width: 340px;
  border: 1px solid color-mix(in srgb, var(--block-color) 24%, var(--line));
  border-top: 2px solid var(--block-color);
  background: var(--panel);
  border-radius: 13px;
  box-shadow: 0 16px 45px #0002;
  z-index: 1;
  --block-color: var(--accent);
  cursor: default;
}
.block:hover {
  box-shadow:
    0 12px 40px #0003,
    0 0 22px color-mix(in srgb, var(--block-color) 7%, transparent);
}
.block.dragging {
  z-index: 5;
  box-shadow: 0 20px 60px #0006;
}
.block-head {
  padding: 17px 17px 11px;
  cursor: grab;
  touch-action: none;
}
.block-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}
.block-number {
  font-size: 0.6429rem;
  letter-spacing: 1.3px;
  color: var(--block-color);
  text-transform: uppercase;
}
.status {
  font-size: 0.6429rem;
  color: var(--muted);
  background: #ffffff06;
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 20px;
}
.status.active {
  color: #c1a8ff;
  background: #a88aff12;
}
.status.done {
  color: #78d9ae;
  background: #78d9ae12;
}
.block-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.block-title-row h2 {
  font-size: 1.0714rem;
  letter-spacing: -0.25px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
.block-title-row .icon-button {
  width: 23px;
  height: 23px;
}
.block-title-row .icon {
  width: 15px;
  height: 15px;
}
.block-description {
  font-size: 0.7143rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.block-progress {
  padding: 0 18px 12px;
}
.progress-track {
  height: 3px;
  background: #ffffff0b;
  border-radius: 3px;
  overflow: hidden;
}
.progress-track > i {
  height: 100%;
  display: block;
  background: var(--block-color, var(--accent));
  border-radius: 3px;
  box-shadow: 0 0 8px var(--block-color, var(--accent));
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 0.6429rem;
  color: var(--muted);
}
.tasks {
  padding: 3px 11px 7px;
}
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-height: 31px;
  padding: 5px 2px;
  border-radius: 6px;
  position: relative;
}
.task-row:hover {
  background: #ffffff04;
}
.task-toggle {
  width: 15px;
  height: 20px;
  flex-shrink: 0;
  padding: 1px 0;
  color: var(--muted);
  font-size: 0.8571rem;
}
.task-toggle.empty {
  visibility: hidden;
}
.check {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border: 1.4px solid #77718c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.check.checked {
  background: var(--block-color, var(--accent));
  border-color: var(--block-color, var(--accent));
  color: var(--bg);
}
.check.partial {
  border-color: var(--block-color, var(--accent));
  background: linear-gradient(
    90deg,
    var(--block-color, var(--accent)) 50%,
    transparent 50%
  );
}
.check svg {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}
.task-title {
  flex: 1;
  text-align: left;
  line-height: 1.6;
  font-size: 0.7857rem;
  padding: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
.task-title.done {
  text-decoration: line-through;
  color: var(--muted);
}
.task-count {
  font-size: 0.6429rem;
  color: var(--muted);
  padding-top: 4px;
  white-space: nowrap;
}
.task-meta {
  font-size: 0.6429rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.task-meta .overdue {
  color: #ff92a6;
}
.task-meta .high {
  color: #f6b68a;
}
.task-children {
  margin-left: 21px;
  border-left: 1px solid #ffffff0b;
  padding-left: 1px;
}
.add-task {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7143rem;
  color: var(--muted);
  padding: 12px 17px;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--line);
}
.add-task:hover {
  color: var(--block-color);
}
.block-footer {
  display: flex;
  gap: 9px;
  padding: 0 17px 13px;
  color: var(--muted);
  font-size: 0.6429rem;
}
.port {
  position: absolute;
  top: 58px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--canvas);
  background: var(--block-color);
  border-radius: 50%;
  padding: 0;
  opacity: 0;
  z-index: 3;
  touch-action: none;
}
.block:hover .port,
.connecting .port {
  opacity: 1;
}
.port.in {
  left: -8px;
}
.port.out {
  right: -8px;
}
.port:hover {
  transform: scale(1.5);
}
.resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 17px;
  height: 17px;
  cursor: ew-resize;
  opacity: 0.25;
  touch-action: none;
}
.resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  width: 6px;
  height: 6px;
}
.canvas-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  z-index: 8;
  box-shadow: 0 4px 20px #0003;
}
.zoom-label {
  font-size: 0.7143rem;
  min-width: 44px;
  text-align: center;
  color: var(--muted);
}
.control-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 5px;
}
.minimap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 150px;
  height: 90px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  z-index: 8;
  cursor: pointer;
}
.canvas-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.7143rem;
  padding: 9px 13px;
  border-radius: 8px;
  white-space: nowrap;
}
.canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  text-align: center;
  color: var(--muted);
}
.list-view {
  overflow-y: auto;
  flex: 1;
  padding: 0 36px 40px;
}
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  align-items: start;
}
.list-grid .block {
  position: relative;
  width: auto !important;
  left: auto !important;
  top: auto !important;
}
.list-grid .block-head {
  cursor: default;
}
.list-grid .port,
.list-grid .resize-handle {
  display: none;
}
.list-grid .task-title {
  font-size: 0.8571rem;
}
.list-grid .task-row {
  min-height: 35px;
}
.notes-content {
  flex: 1;
  overflow: auto;
  padding: 0 36px 40px;
}
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 27px;
}
.filter-chip {
  font-size: 0.7857rem;
  padding: 8px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.filter-chip.active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
}
.notes-toolbar .search-box {
  margin-left: auto;
}
.note-section-label {
  font-size: 0.6429rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin: 20px 0 13px;
}
.notes-grid {
  columns: 3 230px;
  column-gap: 17px;
}
.note-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 17px;
  background: var(--note-color);
  border: 1px solid #ffffff15;
  border-radius: 14px;
  padding: 21px 21px 13px;
  color: var(--note-ink, #2e2b38);
  cursor: pointer;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
  overflow-wrap: anywhere;
}
.note-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px #0002;
}
.note-card h2 {
  font-size: 1.0714rem;
  line-height: 1.5;
  font-weight: 650;
  padding-right: 23px;
}
.note-card p {
  font-size: 0.8571rem;
  white-space: pre-wrap;
  line-height: 1.9;
  margin-top: 13px;
  opacity: 0.8;
}
.note-top {
  position: relative;
}
.note-pin {
  position: absolute;
  right: -5px;
  top: -5px;
  color: inherit;
  opacity: 0.7;
}
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  opacity: 0.65;
}
.note-footer small {
  font-size: 0.6429rem;
}
.note-card .icon-button {
  color: inherit;
  width: 26px;
  height: 26px;
}
.note-card .icon-button:hover {
  background: #0001;
}
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 17px;
}
.note-tag {
  font-size: 0.6429rem;
  background: #0000000d;
  padding: 4px 7px;
  border-radius: 5px;
}
.note-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8571rem;
  line-height: 1.6;
}
.note-check-item .check {
  border-color: #0004;
  border-radius: 4px;
  width: 14px;
  height: 14px;
}
.note-check-item .check.checked {
  background: #0007;
  border-color: transparent;
  color: white;
}
.note-check-item.done span {
  text-decoration: line-through;
  opacity: 0.6;
}
.new-note-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 11px;
  min-height: 165px;
  border: 1px dashed #ffffff20;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.8571rem;
  break-inside: avoid;
  margin-bottom: 17px;
  width: 100%;
}
.new-note-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.new-note-card .icon {
  width: 27px;
  height: 27px;
}
.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 2;
}
.mobile-only {
  display: none;
}
.mobile-nav {
  display: none;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #ffffff1c;
  border-radius: 18px;
  padding: 0;
  max-width: calc(100vw - 32px);
  width: 540px;
  max-height: 90dvh;
  box-shadow: 0 30px 120px #0008;
}
dialog::backdrop {
  background: #080811b8;
  backdrop-filter: blur(7px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 15px;
  gap: 12px;
}
.dialog-head h2 {
  font-size: 1.2143rem;
  letter-spacing: -0.4px;
  font-weight: 600;
}
.dialog-body {
  padding: 6px 24px 24px;
  overflow-y: auto;
  max-height: calc(90dvh - 135px);
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
}
.dialog-footer .spacer {
  flex: 1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
}
.field > label,
.field-label {
  font-size: 0.7857rem;
  color: var(--muted);
}
.field-row {
  display: flex;
  gap: 14px;
}
.field-row > .field {
  flex: 1;
}
.field textarea {
  min-height: 100px;
}
.field-help {
  font-size: 0.7857rem;
  color: var(--muted);
  line-height: 1.7;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.swatch {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px #ffffff15;
}
.swatch.active {
  border-color: var(--panel);
  outline: 2px solid var(--accent);
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8571rem;
}
.switch {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #ffffff15;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.switch::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s;
}
.switch:checked {
  background: var(--accent);
}
.switch:checked::before {
  transform: translateX(14px);
  background: #201834;
}
.section-title {
  font-size: 0.7143rem;
  color: var(--accent);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin: 25px 0 12px;
}
.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.7857rem;
  min-width: 0;
}
.attachment a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-decoration: none;
  color: var(--text);
}
.attachment small {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.6429rem;
}
.upload-button {
  position: relative;
  overflow: hidden;
}
.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.checklist-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.checklist-edit input[type="text"] {
  flex: 1;
  font-size: 0.8571rem;
}
.checklist-edit input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.settings-tabs {
  margin: 0 24px 14px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.code-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: Consolas, monospace;
  font-size: 0.7857rem;
  line-height: 1.8;
  margin-top: 10px;
  user-select: all;
}
.token-box {
  color: var(--accent);
}
.edge-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.edge-title {
  font-size: 0.8571rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.edge-fields {
  display: flex;
  gap: 8px;
}
.edge-fields input {
  width: 100%;
  font-size: 0.8571rem;
}
.edge-fields select {
  width: 110px;
  font-size: 0.7857rem;
}
.edge-color {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 40% 20%, #7152b51c, transparent 55%), var(--bg);
  padding: 24px;
}
.login-card {
  width: 380px;
  max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 35px;
}
.login .brand {
  justify-content: center;
  padding-bottom: 32px;
}
.login h1 {
  font-size: 1.5rem;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.login p {
  font-size: 0.8571rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}
.login .primary {
  width: 100%;
  margin-top: 8px;
}
.form-error {
  color: #ff9cac;
  font-size: 0.8571rem;
  line-height: 1.6;
  margin-top: 13px;
}
.welcome-art {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.7857rem;
}
#toasts {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
  max-width: calc(100vw - 30px);
}
.toast {
  background: var(--panel2);
  border: 1px solid #ffffff20;
  box-shadow: 0 5px 30px #0005;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.8571rem;
  line-height: 1.5;
  pointer-events: auto;
}
.toast.error {
  border-color: #ff8a9a60;
}
.text-button {
  color: var(--accent);
  padding: 6px;
  font-size: 0.7857rem;
}
.note-editor-title {
  font-size: 1.4286rem;
  font-weight: 600;
}
.compact .task-row {
  min-height: 25px;
  padding-top: 2px;
  padding-bottom: 2px;
}
.compact .block-head {
  padding-top: 12px;
}
.light {
  color-scheme: light;
  --bg: #f4f3f8;
  --canvas: #f8f7fc;
  --sidebar: #ecebf3;
  --panel: #fff;
  --panel2: #eeecf6;
  --line: #28203c16;
  --muted: #777187;
  --text: #272133;
}
.light .canvas-wrap.grid {
  background-image: radial-gradient(#77738a35 0.8px, transparent 0.8px);
}
.light .task-children {
  border-color: #30205014;
}
.light .task-row:hover {
  background: #30205006;
}
.light .progress-track {
  background: #3020500d;
}
.light .status {
  background: #30205005;
}
.light .tabs {
  background: #30205004;
}
.light .new-note-card {
  border-color: #30205030;
}
.light .login {
  background: var(--bg);
}
@media (min-width: 1600px) {
  .page-heading {
    padding-top: 40px;
  }
  .notes-grid {
    columns: 4 240px;
  }
  .sidebar {
    width: 250px;
  }
  .page-heading h1 {
    font-size: 2.2143rem;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 194px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .topbar {
    padding: 0 24px;
  }
  .page-heading {
    padding-left: 24px;
    padding-right: 24px;
  }
  .board-toolbar {
    padding-left: 24px;
    padding-right: 24px;
  }
  .progress-card {
    min-width: 170px;
    padding: 11px;
  }
  .toolbar-right .search-box input {
    width: 160px;
  }
  .notes-content,
  .list-view {
    padding-left: 24px;
    padding-right: 24px;
  }
  .heading-buttons {
    padding-top: 14px;
  }
  .heading-buttons .primary {
    padding: 10px;
  }
  .notes-toolbar .search-box {
    width: 100%;
    margin: 8px 0 0;
  }
  .notes-toolbar .search-box input {
    width: 100%;
  }
}
@media (max-width: 760px) {
  :root {
    font-size: 1rem;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 0.7857rem;
  }
  .topbar-actions {
    gap: 5px;
  }
  .save-status {
    font-size: 0.6429rem;
  }
  .save-status .status-text {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-only {
    display: inline-flex;
  }
  .desktop-only {
    display: none !important;
  }
  .main {
    padding-bottom: calc(65px + env(safe-area-inset-bottom));
  }
  .page-heading {
    padding: 24px 20px 20px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .page-heading h1 {
    font-size: 1.7857rem;
  }
  .page-heading p {
    font-size: 0.7857rem;
    max-width: 300px;
  }
  .eyebrow {
    font-size: 0.6429rem;
    margin-bottom: 8px;
  }
  .heading-buttons {
    padding-top: 0;
    margin-left: auto;
    gap: 7px;
  }
  .heading-buttons .primary {
    min-height: 37px;
  }
  .heading-buttons .primary .button-label {
    display: none;
  }
  .progress-card {
    padding: 9px 12px;
    min-width: 0;
    gap: 10px;
  }
  .progress-card strong {
    font-size: 0.7143rem;
  }
  .progress-card small {
    font-size: 0.6429rem;
  }
  .progress-ring {
    width: 34px;
    height: 34px;
    padding: 3px;
  }
  .progress-ring span {
    width: 28px;
    height: 28px;
    font-size: 0.6429rem;
  }
  .board-toolbar {
    padding: 0 20px 16px;
    flex-wrap: wrap;
  }
  .toolbar-right {
    gap: 2px;
  }
  .toolbar-right .search-box {
    display: none;
  }
  .tab {
    padding: 8px 10px;
    font-size: 0.7143rem;
  }
  .canvas-wrap {
    margin: 0 10px 9px;
    border-radius: 12px;
  }
  .minimap {
    width: 90px;
    height: 57px;
    bottom: 12px;
    right: 10px;
  }
  .canvas-controls {
    left: 10px;
    bottom: 12px;
  }
  .canvas-hint {
    max-width: 90%;
    white-space: normal;
    text-align: center;
    font-size: 0.7143rem;
    line-height: 1.5;
  }
  .list-view {
    padding: 0 16px 25px;
  }
  .list-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .list-grid .block {
    border-radius: 14px;
  }
  .list-grid .block-head {
    padding: 17px 17px 10px;
  }
  .list-grid .block-title-row h2 {
    font-size: 16px;
  }
  .list-grid .block-description {
    font-size: 0.8571rem;
  }
  .list-grid .task-row {
    min-height: 42px;
    align-items: flex-start;
    padding-top: 9px;
    padding-bottom: 7px;
  }
  .list-grid .task-title {
    font-size: 0.9286rem;
  }
  .list-grid .check {
    width: 19px;
    height: 19px;
    margin-top: 2px;
  }
  .list-grid .task-toggle {
    width: 21px;
    font-size: 16px;
  }
  .list-grid .task-count {
    font-size: 0.7143rem;
  }
  .list-grid .add-task {
    font-size: 0.8571rem;
    min-height: 44px;
  }
  .list-grid .task-meta {
    font-size: 0.7143rem;
  }
  .notes-content {
    padding: 0 16px 25px;
  }
  .notes-toolbar {
    gap: 5px;
    margin-bottom: 15px;
  }
  .filter-chip {
    font-size: 0.7143rem;
    padding: 8px 10px;
  }
  .notes-grid {
    columns: 2 140px;
    column-gap: 10px;
  }
  .note-card {
    padding: 16px 14px 10px;
    margin-bottom: 10px;
    border-radius: 12px;
  }
  .note-card h2 {
    font-size: 0.9286rem;
  }
  .note-card p {
    font-size: 0.7857rem;
    line-height: 1.8;
  }
  .note-card .note-footer {
    margin-top: 12px;
  }
  .note-card .note-footer small {
    font-size: 0.5714rem;
  }
  .note-check-item {
    font-size: 0.7857rem;
    gap: 6px;
  }
  .note-tag {
    font-size: 0.5714rem;
  }
  .new-note-card {
    min-height: 135px;
    font-size: 0.7857rem;
    margin-bottom: 10px;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: calc(65px + env(safe-area-inset-bottom));
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    background: var(--sidebar);
    border-top: 1px solid var(--line);
    z-index: 30;
  }
  .mobile-nav button {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    font-size: 0.6429rem;
    color: var(--muted);
    border-radius: 10px;
  }
  .mobile-nav button.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
  }
  .mobile-nav .icon {
    width: 20px;
    height: 20px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 19px 19px 0 0;
    border-bottom: 0;
  }
  .dialog-head {
    padding: 20px 20px 14px;
  }
  .dialog-body {
    padding: 6px 20px 22px;
    max-height: calc(94dvh - 145px);
  }
  .dialog-footer {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }
  .dialog-footer button {
    min-height: 42px;
  }
  .settings-tabs {
    margin-left: 20px;
    margin-right: 20px;
  }
  .field-row {
    gap: 10px;
  }
  .field-row > .field {
    min-width: 0;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .login-card {
    padding: 28px;
  }
  .login input {
    font-size: 16px;
  }
  .icon-button {
    min-width: 36px;
    min-height: 36px;
  }
  .task-toggle {
    min-height: 24px;
  }
  .block-title-row .icon-button {
    min-width: 28px;
    min-height: 28px;
  }
  .port {
    opacity: 1;
    width: 20px;
    height: 20px;
  }
  .port.in {
    left: -11px;
  }
  .port.out {
    right: -11px;
  }
  #toasts {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .attachment {
    padding: 8px;
  }
  .attachment small {
    display: none;
  }
  .swatch {
    width: 32px;
    height: 32px;
  }
  .edge-fields {
    flex-wrap: wrap;
  }
  .edge-fields select {
    width: 100%;
  }
  .field-help {
    font-size: 0.8571rem;
  }
  .mobile-board-switch {
    max-width: 190px;
    border: 0;
    padding: 4px;
    background: none;
    font-size: 0.7857rem;
    color: var(--muted);
  }
  .code-box {
    font-size: 0.7143rem;
  }
  .notes-toolbar .search-box input {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.main {
  background-image:
    linear-gradient(
      var(--main-shade, transparent),
      var(--main-shade, transparent)
    ),
    var(--main-image, none);
  background-size: cover;
  background-position: center;
}
.notes-content {
  background-image:
    linear-gradient(
      var(--notes-shade, transparent),
      var(--notes-shade, transparent)
    ),
    var(--notes-image, none);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}
.canvas-wrap {
  background-image:
    linear-gradient(
      var(--board-shade, transparent),
      var(--board-shade, transparent)
    ),
    var(--board-image, none);
  background-size: cover;
  background-position: center;
}
.canvas-wrap.grid,
.light .canvas-wrap.grid {
  background-image:
    radial-gradient(#77738a38 0.8px, transparent 0.8px),
    linear-gradient(
      var(--board-shade, transparent),
      var(--board-shade, transparent)
    ),
    var(--board-image, none);
  background-size:
    22px 22px,
    cover,
    cover;
  background-position:
    0 0,
    center,
    center;
}
.background-setting {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.background-sample {
  height: 95px;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #efedf8;
  font-size: 12px;
  margin-bottom: 15px;
}
.main,
.list-view,
.notes-content {
  position: relative;
  isolation: isolate;
}
.ambient-effect {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
}
.ambient-effect[hidden] {
  display: none;
}
.background-colors {
  display: flex;
  gap: 16px;
  margin: 12px 0 20px;
}
.background-colors label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.background-colors input {
  width: 58px;
  height: 37px;
  padding: 3px;
  cursor: pointer;
}
.ghost-cursor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 22;
  mix-blend-mode: screen;
  user-select: none;
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .ghost-cursor {
    display: none;
  }
}
