/* styles.css */
:root {
  --bg: hsl(0, 0%, 91%);
  --grid-dot: #888888;
  --chrome-bg: #ffffff;
  --chrome-bg-darker: #d0d0d0;
  --chrome-border: #c5c5c5;
  --tab-border: #cbcbcb;
  --surface-hover: #f0f1f4;
  --panel-2: #e9ebef;
  --panel-2-hover: #dfe2e7;
  --card-bg: #ffffff;
  --code-bg: #eef0f3;
  --icon: #5a6472;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
  --scrim: rgba(20, 22, 32, 0.45);
  --accent: #4597f7;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(69, 151, 247, 0.12);
  --danger: #e2476d;
  --text: #1d2330;
  --muted: #8a93a2;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    system-ui,
    sans-serif;
  --home-border: #24292f;
}
:root[data-theme=dark] {
  --bg: #1d1f24;
  --grid-dot: #3b3f46;
  --chrome-bg: #141517;
  --chrome-bg-darker: #212327;
  --chrome-border: #34373d;
  --tab-border: #34373d;
  --surface-hover: #2c2f34;
  --panel-2: #2a2d33;
  --panel-2-hover: #383b42;
  --card-bg: #26282d;
  --code-bg: #2a2d33;
  --icon: #aeb6c2;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 0, 0, 0.55);
  --danger: #ff6b8b;
  --text: #e7e9ee;
  --muted: #8b93a1;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--chrome-bg-darker);
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
#scene {
  position: fixed;
  inset: 0;
  display: block;
  touch-action: none;
  cursor: default;
}
#overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
#chrome {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
#chrome > * {
  pointer-events: auto;
}
.toolbar {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.tool-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tool-btn:hover {
  background: var(--surface-hover);
}
.tool-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.tool-btn svg {
  width: 20px;
  height: 20px;
}
.nav-bar {
  position: absolute;
  left: 16px;
  bottom: 18px;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav-btn {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
}
.nav-btn:hover {
  background: var(--surface-hover);
}
.nav-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.nav-btn svg {
  width: 20px;
  height: 20px;
}
.nav-key {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.6;
  line-height: 1;
}
.shape-flyout {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.shape-kind {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
}
.shape-kind:hover {
  background: var(--surface-hover);
}
.shape-kind.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.shape-kind svg {
  width: 20px;
  height: 20px;
}
.context-menu {
  position: absolute;
  z-index: 150;
  min-width: 168px;
  padding: 6px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  font-size: 13px;
}
.ctx-item {
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text);
}
.ctx-item:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}
.ctx-sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--chrome-border);
}
.quick-bar {
  position: absolute;
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 5px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  animation: qa-pop 0.09s ease-out;
}
@keyframes qa-pop {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
}
.qa-cell {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--icon);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.qa-cell:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}
.qa-ic {
  display: grid;
  place-items: center;
}
.qa-ic svg {
  width: 22px;
  height: 22px;
}
.qa-num {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.qa-cell:hover .qa-num {
  color: rgba(255, 255, 255, 0.9);
}
.qa-more {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.qa-cell:hover .qa-more {
  color: rgba(255, 255, 255, 0.9);
}
.quick-bar.qa-dim {
  opacity: 0.4;
}
.quick-bar.quick-sub {
  z-index: 61;
}
.palette {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.swatch {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1.5px solid var(--chrome-border);
  cursor: pointer;
  transition: transform 0.1s;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  user-select: none;
}
.swatch:hover {
  transform: scale(1.12);
}
.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tpl-modal {
  width: 460px;
  max-width: 92vw;
  padding: 18px;
}
.tpl-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tpl-card {
  text-align: left;
  padding: 10px;
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  background: var(--card-bg);
  cursor: pointer;
  transition:
    border-color 0.12s,
    background 0.12s,
    transform 0.08s;
}
.tpl-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.tpl-card:active {
  transform: translateY(1px);
}
.tpl-thumb {
  height: 84px;
  margin-bottom: 9px;
  border-radius: 7px;
  background: var(--canvas-bg, #f4f6f9);
  border: 1px solid var(--chrome-border);
  overflow: hidden;
}
.tpl-thumb.blank {
  display: grid;
  place-items: center;
}
.tpl-thumb.blank::after {
  content: "Blank";
  font-size: 11px;
  color: var(--muted);
}
.tpl-thumb-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.tpl-thumb.blank .tpl-thumb-canvas {
  display: none;
}
.tpl-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tpl-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.mod-hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}
.mod-hud.hidden {
  display: none;
}
.mod-pop {
  min-width: 168px;
  padding: 9px 11px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 11px;
  box-shadow: var(--shadow);
}
.mod-pop-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 7px;
}
.mod-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text);
  padding: 2px 0;
}
.mod-row kbd {
  flex: none;
  min-width: 30px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--chrome-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
}
.mod-row span {
  color: var(--muted);
}
.mod-empty {
  font-size: 11.5px;
  font-style: italic;
  color: var(--muted);
}
.mod-pills {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.mod-pill {
  width: 30px;
  height: 26px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: var(--chrome-bg);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background 0.1s,
    color 0.1s,
    border-color 0.1s;
}
.mod-pill:hover {
  color: var(--text);
}
.mod-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.explorer {
  position: fixed;
  top: 54px;
  right: 12px;
  bottom: 12px;
  width: 248px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: qa-pop 0.1s ease-out;
}
.explorer-head {
  flex: none;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--chrome-border);
}
.explorer-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.explorer-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.explorer-row:hover {
  background: var(--surface-hover);
}
.explorer-row.cursor {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.explorer-ic {
  flex: none;
  width: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.explorer-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.explorer-check {
  flex: none;
  color: var(--accent);
  font-weight: 700;
  opacity: 0;
}
.explorer-row.chosen .explorer-check {
  opacity: 1;
}
.explorer-row.chosen .explorer-label {
  font-weight: 600;
}
.explorer-hints {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--chrome-border);
  font-size: 10.5px;
  color: var(--muted);
}
.explorer-hints kbd {
  margin-right: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--chrome-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text);
}
.chain-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: min(70vw, 720px);
  padding: 8px 14px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: qa-pop 0.09s ease-out;
}
.chain-crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.chain-crumb {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chain-crumb:last-child {
  color: var(--accent);
}
.chain-sep {
  color: var(--muted);
  flex: none;
}
.chain-hints {
  display: flex;
  gap: 14px;
  font-size: 10.5px;
  color: var(--muted);
}
.chain-hints kbd {
  margin-right: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--chrome-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}
.note-panel {
  position: fixed;
  left: 16px;
  top: 54px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 14px 14px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: qa-pop 0.09s ease-out;
}
.np-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.np-rows2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.np-subcol {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.np-head {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1px;
}
.np-note {
  font-size: 10px;
  font-style: italic;
  color: var(--muted);
  opacity: 0.8;
  margin-top: auto;
  padding-top: 4px;
  white-space: normal;
  max-width: 130px;
  line-height: 1.3;
}
.np-group kbd {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  padding: 1px 5px;
  margin-right: 3px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--chrome-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
}
.np-sep {
  height: 1px;
  align-self: stretch;
  background: var(--tab-border);
}
.np-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.note-panel.nohint .np-hintcol,
.note-panel.nohint .np-sep {
  display: none;
}
.zoom-pill {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.zoom-pill button {
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--icon);
  font-size: 15px;
}
.zoom-pill button:hover {
  background: var(--surface-hover);
}
.zoom-pill .zoom-label {
  min-width: 52px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.topbar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.topbar .board-name {
  font-weight: 600;
  cursor: pointer;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .board-name:hover {
  color: var(--accent);
}
.save-indicator {
  color: var(--muted);
  font-size: 12px;
}
.tabbar {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0px;
  pointer-events: none;
  background: var(--chrome-bg-darker);
}
.tabbar > * {
  pointer-events: auto;
}
.tab-traffic {
  width: 82px;
  height: 38px;
  flex: none;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-bg-darker);
}
.tab-home {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-right: 1px solid var(--tab-border);
  cursor: pointer;
  color: var(--icon);
  border-bottom: 1px solid var(--chrome-border);
  border-right: 2px solid var(--chrome-border);
  border-left: 2px solid var(--chrome-border);
  background: var(--chrome-bg-darker);
}
.tab-home:hover {
  background: var(--surface-hover);
}
.tab-home.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  border-bottom: none;
}
.tab-home svg {
  width: 20px;
  height: 20px;
}
.tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  height: 38px;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-bg-darker);
}
.chrome-tip {
  position: fixed;
  z-index: 300;
  padding: 4px 8px;
  background: var(--home-border, #24292f);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
:root[data-theme=dark] .chrome-tip {
  background: #e7e9ee;
  color: #1d2330;
}
.tab-preview {
  position: fixed;
  z-index: 130;
  width: 248px;
  padding: 4px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: qa-pop 0.1s ease-out;
}
.tab-preview-canvas {
  display: block;
  width: 240px;
  height: 150px;
  border-radius: 6px;
  background: var(--bg);
}
.tab-right {
  display: flex;
  flex: none;
  height: 38px;
  align-items: stretch;
}
.tab-right .tab-home {
  border-left: 1px solid var(--tab-border);
  border-right: none;
}
.tab-sync.on {
  color: var(--accent);
}
.tabs::-webkit-scrollbar {
  height: 0;
}
.tab {
  display: flex;
  align-items: center;
  flex: none;
  max-width: 201px;
  min-width: 201px;
  padding: 5px 6px 5px 12px;
  border: none;
  border-right: 2px solid var(--tab-border);
  cursor: pointer;
  color: var(--icon);
  justify-content: space-between;
}
.tab:hover {
  background: var(--surface-hover);
}
.tab.tab-enter {
  animation: tab-enter 0.18s ease-out;
}
@keyframes tab-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}
.tab.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.tab-folder {
  flex: 0 200 auto;
  min-width: 0;
  margin-right: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.55;
}
.tab-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.full-tabs .tab {
  max-width: none;
}
.full-tabs .tab-name {
  overflow: visible;
  text-overflow: clip;
}
.tab-close {
  flex: none;
  margin-left: 6px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  width: 18px;
  height: 18px;
  opacity: 0.5;
  font-size: 14px;
  line-height: 1;
}
.tab:hover .tab-close,
.tab.active .tab-close {
  opacity: 0.9;
}
.tab-close:hover {
  background: rgba(0, 0, 0, 0.15);
}
.tab-new {
  align-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  z-index: 101;
  background: none;
  border-right: 2px solid var(--chrome-border);
}
.tab-new:hover {
  background: var(--surface-hover);
}
.tabbar .save-indicator {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  padding: 0 4px;
}
.home {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #ffffff;
  overflow: auto;
  animation: home-in 0.16s ease-out;
}
@keyframes home-in {
  from {
    opacity: 0;
    transform: scale(0.996);
  }
}
@keyframes scrim-in {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
.settings-scrim,
.open-scrim,
.confirm-scrim {
  animation: scrim-in 0.12s ease-out;
}
.settings-modal,
.open-modal,
.confirm-dialog {
  animation: modal-in 0.18s cubic-bezier(0.34, 1.25, 0.5, 1);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.board-card {
  animation: card-in 0.18s ease-out both;
}
:root[data-theme=dark] .home {
  background: var(--bg);
}
.folder-caret {
  width: 14px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
}
.folder-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-radius: 5px;
  transition: transform 0.12s, background 0.1s;
}
.folder-chevron svg {
  width: 12px;
  height: 12px;
}
.folder-chevron:hover {
  background: var(--accent);
  color: var(--text);
}
.folder-chevron.open {
  transform: rotate(90deg);
}
.board-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  margin-left: 24px;
}
.board-leaf:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.leaf-edit {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  padding: 0 2px;
  display: inline-grid;
  place-items: center;
}
.leaf-edit svg {
  width: 16px;
  height: 16px;
  color: white;
}
.leaf-edit svg:hover {
  background: var(--accent);
}
.board-leaf:hover .leaf-edit {
  opacity: 0.8;
}
.board-menu {
  width: 200px;
  gap: 2px;
}
.bm-item {
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.bm-item:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}
.bm-danger {
  color: var(--danger);
}
.bm-danger:hover {
  background: var(--danger);
  color: #fff;
}
.leaf-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.leaf-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-section {
  margin-bottom: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--tab-border);
  user-select: none;
}
.section-caret {
  font-size: 11px;
  color: var(--muted);
}
.section-name {
  font-weight: 600;
  font-size: 14px;
}
.section-count {
  color: var(--muted);
  font-size: 12px;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 1px 8px;
}
.home-panel {
  margin: 0 auto;
  padding: 54px 28px 56px;
}
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.home-panel h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.home-panel .sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.home-toggle {
  display: flex;
  gap: 2px;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 3px;
  flex: none;
}
.home-toggle button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--icon);
  font-size: 13px;
  font-weight: 500;
}
.home-toggle button.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.home-close {
  border: none;
  background: var(--panel-2);
  color: var(--icon);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  flex: none;
}
.home-close:hover {
  background: var(--panel-2-hover);
}
.rail-head {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}
.rail-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.main-crumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}
.crumb {
  border-radius: 5px;
  padding: 1px 3px;
}
.crumb.link {
  cursor: pointer;
}
.crumb.link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}
.crumb-sep {
  opacity: 0.55;
}
.main-title-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
}
.main-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.main-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.home-searchbar {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 9px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.home-searchbar::placeholder {
  color: var(--muted);
}
.home-searchbar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.main-heading {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.main-count {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.main-new {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: filter 0.12s, transform 0.12s;
}
.main-new span {
  font-size: 15px;
  line-height: 1;
}
.main-new:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}
.board-card {
  position: relative;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--chrome-border);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    border-color 0.12s;
}
.board-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-soft);
}
.board-card.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.board-thumb {
  position: relative;
  height: 118px;
  background-color: hsl(var(--thumb-hue, 220), 38%, 96%);
  border-bottom: 1px solid var(--chrome-border);
}
.board-thumb-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.board-thumb.blank .board-thumb-canvas {
  display: none;
}
:root[data-theme=dark] .board-thumb {
  background-color: hsl(var(--thumb-hue, 220), 16%, 20%);
}
.board-body {
  padding: 12px 14px;
}
.board-card .name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-card .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.board-card .del {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  border: none;
  background: var(--card-bg);
  border-radius: 8px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: var(--icon);
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.board-card:hover .del {
  opacity: 1;
}
.board-card .del:hover {
  background: var(--card-bg);
  color: var(--danger);
}
.board-card.new {
  display: grid;
  place-items: center;
  min-height: 174px;
  background: transparent;
  border: 2px dashed var(--chrome-border);
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}
.board-card.new:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: none;
  box-shadow: none;
}
.home-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-list .board-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}
.home-list .board-card:hover {
  transform: none;
}
.home-list .board-thumb {
  height: 40px;
  width: 56px;
  flex: none;
  border-radius: 8px;
}
.home-list .board-body {
  padding: 0;
  flex: 1;
  min-width: 0;
}
.home-list .board-card .del {
  position: static;
  opacity: 1;
  margin-left: auto;
  box-shadow: none;
  background: var(--surface-hover);
}
.home-list .board-card.new {
  min-height: 0;
  padding: 16px;
}
.notes-sidebar {
  position: absolute;
  top: 38px;
  right: 0px;
  bottom: 0px;
  width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--chrome-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.notes-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--chrome-border);
}
.notes-title {
  font-weight: 600;
  font-size: 14px;
}
.notes-close {
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.notes-close:hover {
  background: var(--surface-hover);
}
.notes-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
.notes-editor {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 12px 16px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
}
.notes-editor::placeholder {
  color: var(--muted);
}
.note-editor {
  position: absolute;
  pointer-events: auto;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
  caret-color: var(--accent);
}
.tab-settings {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-left: 1px solid var(--tab-border);
  cursor: pointer;
  color: var(--icon);
  background: var(--chrome-bg-darker);
}
.tab-settings:hover {
  color: var(--accent);
}
.tab-settings.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.tab-settings svg {
  width: 19px;
  height: 19px;
}
.settings-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--scrim);
  display: grid;
  place-items: center;
  animation: settings-fade 0.12s ease-out;
}
@keyframes settings-fade {
  from {
    opacity: 0;
  }
}
.settings-modal {
  width: 470px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 24px 26px;
  animation: settings-pop 0.12s ease-out;
}
@keyframes settings-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.settings-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-hover);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}
.settings-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.settings-tab:hover {
  color: var(--text);
}
.settings-tab.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.settings-body {
  min-height: 176px;
}
.settings-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.settings-close {
  border: none;
  background: var(--panel-2);
  color: var(--icon);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.settings-close:hover {
  background: var(--panel-2-hover);
}
.settings-section {
  margin-bottom: 22px;
}
.settings-section:last-child {
  margin-bottom: 0;
}
.settings-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}
.settings-seg {
  position: relative;
  display: flex;
  gap: 0;
  background: var(--surface-hover);
  border-radius: 12px;
  padding: 4px;
}
.seg-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  height: calc(100% - 8px);
  background: var(--card-bg);
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.settings-seg button {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 11px 8px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.18s;
}
.settings-seg button svg {
  width: 22px;
  height: 22px;
}
.settings-seg button:hover {
  color: var(--text);
}
.settings-seg button.active {
  color: var(--text);
}
.settings-accents {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.accent-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  padding: 0;
  position: relative;
  transition: transform 0.1s;
}
.accent-dot:hover {
  transform: scale(1.12);
}
.accent-dot.active {
  box-shadow: 0 0 0 2px var(--chrome-bg), 0 0 0 4px var(--accent);
}
.accent-custom {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px dashed var(--chrome-border);
  background:
    conic-gradient(
      from 0deg,
      #f2495c,
      #f2851b,
      #16b981,
      #0ea5a5,
      #4597f7,
      #9b59f6,
      #ec4899,
      #f2495c);
  display: grid;
  place-items: center;
}
.accent-custom input[type=color] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.accent-custom.active {
  box-shadow: 0 0 0 2px var(--chrome-bg), 0 0 0 4px var(--accent);
}
.home-panel {
}
.search-modal {
  padding: 14px;
}
.search-modal .open-search {
  margin: 0;
}
.home-layout {
  display: flex;
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 110px);
}
.home-rail {
  flex: none;
  width: 320px;
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 0;
  margin: -54px 0 -56px -28px;
  padding: 38px 0 0 0;
}
.rail-body {
  flex: 1;
  padding: 16px 16px 24px;
}
.home-rail .home-sidebar {
  width: 100%;
  position: static;
  top: auto;
}
.home-sidebar {
  flex: none;
  width: 240px;
  position: sticky;
  top: 54px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-rail .folder-row,
.home-rail .board-leaf,
.home-rail .folder-name,
.home-rail .leaf-name,
.home-rail .folder-chevron,
.home-rail .folder-edit {
  color: var(--accent-contrast);
}
.home-rail .folder-count {
  color: rgba(255, 255, 255, 0.6);
}
.home-rail .board-leaf,
.home-rail .leaf-name {
  color: rgba(255, 255, 255, 0.82);
}
.home-rail .folder-row:hover,
.home-rail .board-leaf:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.home-rail .folder-row.active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 600;
}
.home-rail .folder-row.drop-target {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.16);
}
.home-rail .home-newfolder {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}
.home-rail .home-newfolder:hover {
  background: rgba(255, 255, 255, 0.12);
}
.home-main {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
}
.folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  user-select: none;
}
.folder-row:hover {
  background: var(--surface-hover);
}
.folder-row.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.folder-row.drop-target {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}
.tree-drop-line {
  position: fixed;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  z-index: 200;
  pointer-events: none;
}
.tree-drop-line::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.folder-ic {
  font-size: 14px;
  opacity: 0.85;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
}
.folder-ic svg {
  width: 15px;
  height: 15px;
}
.fav-row {
  margin-top: 6px;
}
.home-rail .fav-row {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 8px;
}
.folder-edit {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  padding: 0 2px;
  display: inline-grid;
  place-items: center;
}
.folder-edit svg {
  width: 16px;
  height: 16px;
}
.folder-row:hover .folder-edit {
  opacity: 0.8;
}
.folder-editor {
  position: fixed;
  z-index: 200;
  width: 264px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.folder-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.folder-del {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--icon);
  font-size: 15px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.folder-row:hover .folder-del {
  opacity: 1;
}
.folder-del:hover {
  color: var(--danger);
}
.home-newfolder {
  margin-top: 10px;
  border: 1px dashed var(--chrome-border);
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.home-newfolder:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.home-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 24px 4px;
}
.board-card.dragging {
  opacity: 0.5;
}
.inline-rename,
.tab-rename {
  font: inherit;
  border: 1px solid var(--accent);
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  min-width: 60px;
}
.tab-rename {
  width: 110px;
}
.open-scrim {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: var(--scrim);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.open-modal {
  width: 540px;
  max-width: 92vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--chrome-border);
  margin-bottom: 12px;
}
.open-title {
  font-weight: 600;
  font-size: 14px;
}
.open-hint {
  color: var(--muted);
  font-size: 11px;
}
.open-hint kbd {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 4px;
  margin: 0 1px;
  font-family: inherit;
}
.open-list {
  overflow-y: auto;
  padding: 6px;
}
.open-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.open-row.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.open-folder {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: default;
  padding-top: 10px;
}
.open-new {
  color: var(--accent);
  font-weight: 600;
}
.open-new.active {
  color: var(--accent-contrast);
}
.open-rowtag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: 6px;
  padding: 1px 7px;
}
.open-row.active .open-rowtag {
  color: var(--accent-contrast);
  background: rgba(255, 255, 255, 0.25);
}
.open-ic {
  width: 16px;
  text-align: center;
  opacity: 0.9;
}
.floating-bar {
  position: absolute;
  z-index: 60;
}
.text-bar {
  display: none;
  gap: 4px;
  padding: 5px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.text-style-btn {
  min-width: 34px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.text-style-btn:nth-child(2) {
  font-weight: 500;
}
.text-style-btn:hover {
  background: var(--surface-hover);
}
.text-style-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.settings-path {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
  line-height: 1.4;
}
.settings-seg button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.br-controls {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.br-controls .zoom-pill {
  position: static;
  right: auto;
  bottom: auto;
}
.present-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--chrome-border);
  background: var(--chrome-bg);
  color: var(--icon);
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.present-btn:hover {
  color: var(--accent);
}
.present-btn svg {
  width: 20px;
  height: 20px;
}
.present-panel {
  position: fixed;
  z-index: 200;
  width: 320px;
  max-height: 60vh;
  overflow: auto;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
}
.present-panel-head {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 10px;
}
.present-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 2px 12px;
}
.present-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.present-num {
  width: 18px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.present-name {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--chrome-border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
}
.present-name:focus {
  border-color: var(--accent);
}
.present-icon {
  width: 26px;
  height: 26px;
  flex: none;
  border: none;
  background: var(--surface-hover);
  border-radius: 7px;
  cursor: pointer;
  color: var(--icon);
  font-size: 14px;
}
.present-icon:hover {
  color: var(--accent);
}
.present-icon:disabled {
  opacity: 0.3;
  cursor: default;
}
.present-start {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
body.presenting .tabbar,
body.presenting .br-controls,
body.presenting .palette,
body.presenting .text-bar,
body.presenting .areas-sidebar,
body.presenting .notes-sidebar,
body.presenting .mod-hud,
body.presenting .note-panel,
body.presenting .chain-bar {
  display: none !important;
}
.present-mode {
  position: fixed;
  inset: 0;
  z-index: 150;
  cursor: pointer;
}
.present-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: default;
}
.present-bar .present-icon {
  width: 32px;
  height: 32px;
  font-size: 18px;
  background: var(--surface-hover);
}
.present-counter {
  min-width: 120px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.present-exit {
  border: none;
  background: var(--surface-hover);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.present-exit:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}
.present-title {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 34px 44px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  pointer-events: none;
}
.present-title.in {
  animation: present-title-in 0.4s ease both;
}
@keyframes present-title-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}
.present-title-dot {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
}
.board-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  padding: 6px 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.confirm-scrim {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--scrim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-box {
  width: 340px;
  max-width: 88vw;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.confirm-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.confirm-detail {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.confirm-actions button {
  padding: 8px 16px;
  border-radius: 9px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.confirm-cancel {
  background: var(--panel-2);
  color: var(--text);
}
.confirm-cancel:hover {
  background: var(--panel-2-hover);
}
.confirm-delete {
  background: var(--danger);
  color: #fff;
}
.confirm-delete:hover {
  filter: brightness(1.05);
}
.areas-sidebar {
  position: absolute;
  top: 38px;
  left: 0;
  bottom: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--chrome-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  outline: none;
}
.areas-head {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--chrome-border);
}
.areas-title {
  font-weight: 600;
  font-size: 14px;
}
.areas-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--icon);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.areas-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.areas-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 10px;
}
.areas-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.areas-row:hover {
  background: var(--surface-hover);
}
.areas-row.active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.areas-num {
  width: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.areas-dot {
  width: 16px;
  height: 16px;
  flex: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--chrome-bg), 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.areas-name {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  background: transparent;
  color: var(--text);
  outline: none;
}
.areas-name:focus {
  border-color: var(--accent);
  background: var(--card-bg);
}
.areas-go {
  flex: none;
  border: none;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  font-size: 15px;
}
.areas-go:hover {
  color: var(--accent);
}
.areas-colormenu {
  position: fixed;
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.areas-swatch {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.areas-swatch:hover {
  transform: scale(1.12);
}
.open-search {
  margin: 0 12px 6px;
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 9px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
}
.open-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.open-list:focus {
  outline: none;
}
.open-list:focus-within,
.open-list:focus {
  box-shadow: inset 0 0 0 2px var(--accent-soft);
  border-radius: 8px;
}
body.fullscreen .tab-traffic {
  display: none;
}
.settings-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.settings-toggle-row + .settings-toggle-row {
  margin-top: 12px;
}
.settings-switch {
  position: relative;
  width: 44px;
  height: 26px;
  border: none;
  border-radius: 13px;
  background: var(--panel-2);
  cursor: pointer;
  transition: background 0.15s;
  flex: none;
}
.settings-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.settings-switch.on {
  background: var(--accent);
}
.settings-switch.on::after {
  transform: translateX(18px);
}
.settings-switch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.board-card .card-star {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border: none;
  background: var(--card-bg);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: opacity 0.1s, color 0.1s;
}
.board-card:hover .card-star,
.board-card .card-star.on {
  opacity: 1;
}
.card-star:hover {
  color: #f5b301;
}
.card-star.on {
  color: #f5b301;
}
.tab.dragging {
  z-index: 5;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transform: scale(1.03);
  border-radius: 6px;
  cursor: grabbing;
}
.tab.dragging .tab-folder {
  opacity: 0.8;
}
.home-sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 9px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.home-sort:hover {
  background: var(--surface-hover);
}
.home-sort .sort-ic,
.home-sort .sort-caret {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}
.home-sort .sort-ic svg {
  width: 15px;
  height: 15px;
}
.home-sort .sort-caret svg {
  width: 13px;
  height: 13px;
}
.home-sortmenu {
  position: fixed;
  z-index: 200;
  min-width: 180px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 5px;
}
.sortmenu-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.sortmenu-item:hover {
  background: var(--surface-hover);
}
.sortmenu-item.active {
  color: var(--accent);
  font-weight: 600;
}
.sortmenu-check {
  width: 14px;
  color: var(--accent);
}
.home-viewtoggle {
  display: inline-flex;
  align-items: center;
  background: var(--panel-2);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.home-viewtoggle button {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
}
.home-viewtoggle button:hover {
  color: var(--text);
}
.home-viewtoggle button.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.home-viewtoggle svg {
  width: 16px;
  height: 16px;
}
.save-scrim {
  position: fixed;
  inset: 0;
  z-index: 185;
  background: var(--scrim);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.save-modal {
  width: 460px;
  max-width: 92vw;
  max-height: 64vh;
  display: flex;
  flex-direction: column;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.save-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--chrome-border);
}
.save-title {
  font-weight: 600;
  font-size: 15px;
}
.save-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.save-list {
  overflow-y: auto;
  padding: 6px;
}
.save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.save-row.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.save-row.save-new {
  color: var(--accent);
  font-weight: 600;
}
.save-row.save-new.active {
  color: var(--accent-contrast);
}
.save-ic {
  width: 16px;
  text-align: center;
  opacity: 0.9;
}
.save-hint {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.6;
}
.save-newinput {
  flex: 1;
  font: inherit;
  font-size: 14px;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
}
.tab-home,
.tab {
  position: relative;
}
.tab-kbd {
  position: absolute;
  top: 3px;
  left: 4px;
  z-index: 5;
  pointer-events: none;
  display: inline-block;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--chrome-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  animation: qa-pop 0.12s ease-out;
}
.notes-title {
  flex: 1;
}
.notes-visualize {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--chrome-border);
  background: var(--surface-hover);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
}
.notes-visualize svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.notes-visualize:hover {
  border-color: var(--accent);
}
.notes-visualize.busy {
  opacity: 0.6;
  pointer-events: none;
}
.notes-visualize.busy svg {
  animation: nv-pulse 0.9s ease-in-out infinite;
}
@keyframes nv-pulse {
  50% {
    opacity: 0.25;
  }
}
.notes-status {
  display: none;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.35;
  border-top: 1px solid var(--chrome-border);
  background: var(--chrome-bg);
}
.notes-status.show {
  display: block;
}
.notes-status.loading {
  color: var(--muted);
}
.notes-status.ok {
  color: var(--text);
}
.notes-status.error {
  color: var(--danger);
}
.settings-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.settings-field-row span {
  width: 72px;
  flex: none;
  font-size: 13px;
  color: var(--muted);
}
.settings-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--chrome-border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
}
.settings-input:focus {
  outline: none;
  border-color: var(--accent);
}
.settings-hint {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
#drift-badge {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font:
    500 11px/1 ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--muted);
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.16s ease;
  user-select: none;
  -webkit-user-select: none;
}
#drift-badge:hover {
  opacity: 1;
}
#drift-badge b {
  color: var(--text);
  font-weight: 700;
}
#drift-badge .db-dots {
  display: inline-flex;
  gap: 3px;
}
#drift-badge .db-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
#drift-badge .db-dots i:nth-child(1) {
  background: #f1a006;
}
#drift-badge .db-dots i:nth-child(2) {
  background: #8269eb;
}
#drift-badge .db-dots i:nth-child(3) {
  background: #10b981;
}
body.presenting #drift-badge {
  display: none;
}
/*# sourceMappingURL=main.css.map */
