:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-muted: #f0f3f2;
  --ink: #22252a;
  --muted: #687076;
  --line: #d9dedb;
  --accent: #157a72;
  --accent-soft: #dff1ee;
  --warn: #a35616;
  --warn-soft: #fff1d7;
  --done: #6f7280;
  --danger: #b33a3a;
  --shadow: 0 16px 32px rgba(33, 37, 41, 0.08);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: var(--sans);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

html {
  height: 100%;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 560px;
}

.brand-mark {
  min-width: max-content;
  height: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.title-input {
  width: min(520px, 100%);
  min-width: 120px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  outline: none;
  padding: 6px 2px;
}

.title-input:focus {
  border-bottom-color: var(--accent);
}

.page-tabs {
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px;
  flex: 1;
}

.page-tabs .page-add-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.page-tab {
  max-width: 150px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.page-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-add-button {
  flex: 0 0 36px;
}

.toolbar-menu {
  position: relative;
}

.toolbar-menu summary {
  list-style: none;
  display: inline-grid;
  place-items: center;
}

.toolbar-menu summary::-webkit-details-marker {
  display: none;
}

.toolbar-menu-list {
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 30;
  min-width: 160px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toolbar-menu-list .text-button {
  width: 100%;
  text-align: left;
}

.icon-button,
.text-button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.icon-button {
  width: 36px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.text-button {
  padding: 0 12px;
  font-weight: 700;
  white-space: nowrap;
}

.icon-button:hover,
.text-button:hover,
.view-button:hover,
.facet-pill:hover,
.tag-result:hover,
.outline-item:hover {
  border-color: #b8c2bf;
  background: #f8faf9;
}

.icon-button:focus-visible,
.text-button:focus-visible,
.view-button:focus-visible,
.facet-pill:focus-visible,
.hash-chip:focus-visible,
.tag-result:focus-visible,
.outline-item:focus-visible,
.title-input:focus-visible,
.search-row input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.danger {
  color: var(--danger);
}

.icon-button:disabled,
.text-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.workspace {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) 320px;
  grid-template-areas: "sidebar editor outline";
  overflow: hidden;
}

.sidebar,
.outline-pane,
.tag-results-pane {
  min-height: 0;
  overflow: auto;
  background: var(--panel-muted);
}

.sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--line);
  padding: 14px;
}

.workspace.tag-open {
  grid-template-columns: 260px 280px minmax(320px, 1fr) 320px;
  grid-template-areas: "sidebar tags editor outline";
}

.workspace.kanban-open {
  grid-template-columns: 260px minmax(520px, 1fr);
  grid-template-areas: "sidebar kanban";
}

.workspace.kanban-open .editor-pane,
.workspace.kanban-open .outline-pane,
.workspace.kanban-open .tag-results-pane {
  display: none;
}

.tag-results-pane {
  grid-area: tags;
  border-right: 1px solid var(--line);
  padding: 14px;
}

.outline-pane {
  grid-area: outline;
  border-left: 1px solid var(--line);
  padding: 14px;
}

.kanban-pane {
  grid-area: kanban;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  padding: 18px;
}

.kanban-pane[hidden] {
  display: none !important;
}

.kanban-head {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kanban-head h2 {
  margin: 0;
  font-size: 18px;
}

.kanban-mode {
  display: flex;
  gap: 6px;
}

.kanban-mode .text-button {
  min-height: 30px;
  padding: 5px 10px;
}

.kanban-mode .text-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.kanban-board {
  height: calc(100% - 50px);
  min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 18px;
  overflow: auto;
  align-items: start;
}

.kanban-column {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.kanban-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}

.kanban-column-head h3 {
  margin: 0;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 14px;
}

.kanban-column-head span {
  color: var(--muted);
  font-size: 12px;
}

.kanban-card {
  width: 100%;
  min-height: 82px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  font-size: 14px;
  line-height: 1.72;
}

.kanban-card:hover {
  border-color: var(--accent);
}

.kanban-card-copy {
  line-height: 1.72;
}

.kanban-card-editor {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.72;
}

.kanban-card-meta {
  color: var(--muted);
  font-size: 11px;
}

.history-panel {
  display: grid;
  gap: 12px;
}

.history-panel summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.history-body {
  margin-top: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.summary-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 8px;
}

.summary-item span {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--accent);
}

.summary-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view-list,
.facet-list {
  display: grid;
  gap: 6px;
}

.view-button,
.facet-pill {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.view-button span,
.facet-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-button strong,
.facet-pill strong {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e4e8e6;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.view-button.active,
.facet-pill.active {
  border-color: #a9d5cf;
  background: var(--accent-soft);
}

.view-button.active strong,
.facet-pill.active strong {
  background: var(--accent);
  color: #fff;
}

.hash-pill {
  background: var(--hash-bg, #edf3f2);
  border-color: var(--hash-border, #bed4d1);
  color: var(--hash-text, var(--ink));
}

.hash-pill:hover,
.hash-pill.active {
  background: var(--hash-bg, #edf3f2);
  border-color: var(--hash-border, #bed4d1);
  box-shadow: 0 0 0 2px var(--hash-ring, rgba(21, 122, 114, 0.16));
}

.hash-pill strong {
  background: rgba(255, 255, 255, 0.66);
  color: var(--hash-text, var(--ink));
  border: 1px solid var(--hash-border, #bed4d1);
}

.facet-block {
  margin-top: 18px;
}

.filters-block {
  margin-top: 12px;
  margin-bottom: 12px;
}

.facet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.facet-block h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.facet-head h2 {
  margin-bottom: 0;
}

.mini-button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.mini-button:hover {
  border-color: var(--accent);
}

.filter-pill {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  justify-content: stretch;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 4px;
}

.filter-remove {
  width: 24px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.filter-remove:hover {
  border-color: var(--line);
  color: var(--ink);
}

.filter-pill em {
  width: 18px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.rule-list,
.shortcut-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.rule-list div,
.shortcut-list div {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.rule-list dt,
.shortcut-list dt {
  min-width: 0;
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rule-list dt {
  font-family: var(--sans);
  font-size: 11px;
}

.rule-list dd,
.shortcut-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-list code {
  font-family: var(--mono);
  color: var(--ink);
}

.editor-pane {
  grid-area: editor;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 34px auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
}

.editor-status {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tag-results-head h2 {
  display: inline-block;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--hash-border, #bed4d1);
  border-radius: 999px;
  background: var(--hash-bg, #edf3f2);
  color: var(--hash-text, var(--ink));
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.tag-results-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag-results-list {
  display: grid;
  gap: 8px;
}

.tag-result {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.tag-result:hover {
  border-color: #b8c2bf;
  background: #f8faf9;
}

.tag-result-line {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tag-result-copy {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
}

.tag-result-page {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 10px;
  font-weight: 900;
  text-decoration: underline;
}

.line-created {
  display: block;
  margin-top: 5px;
  color: #4d555b;
  font-size: 10px;
  line-height: 1.2;
}

.pinned-pane {
  grid-row: 2;
  max-height: 180px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
  padding: 8px 14px 10px;
}

.pinned-pane[hidden] {
  display: none !important;
}

.pinned-pane h2 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pinned-list {
  display: grid;
  gap: 6px;
}

.pinned-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 7px 9px;
  cursor: pointer;
}

.pinned-item:hover {
  border-color: #b8c2bf;
  background: #f8faf9;
}

.pinned-item.compact {
  padding: 7px 8px;
}

.pinned-copy {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}

.pinned-meta {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4d555b;
  font-size: 10px;
  font-weight: 800;
}

.short-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.editor-wrap {
  grid-row: 3;
  position: relative;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

#editor,
.editor-highlight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px 22px 80px 64px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.62;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.editor-highlight {
  z-index: 0;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
}

.line-marker {
  position: absolute;
  left: 56px;
  right: 22px;
  top: 18px;
  z-index: 0;
  min-height: 24px;
  border-radius: 6px;
  background: rgba(255, 225, 82, 0.48);
  box-shadow: 0 0 0 1px rgba(183, 130, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.line-marker.show {
  opacity: 1;
}

.line-widgets {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  font-family: var(--mono);
}

.line-control {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.group-guide {
  position: absolute;
  z-index: 2;
  width: 1px;
  border-radius: 999px;
  background: rgba(130, 136, 136, 0.44);
  pointer-events: none;
}

.collapse-line {
  width: 18px;
  height: 18px;
  border: 1px solid #c6cecb;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.96);
  color: #4f5a61;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(33, 37, 41, 0.08);
}

.check-line {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  opacity: 0;
}

.bullet-line {
  width: 16px;
  height: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.collapsed-cover {
  position: absolute;
  left: 56px;
  right: 22px;
  display: flex;
  align-items: flex-start;
  padding: 2px 0 0 24px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  pointer-events: auto;
}

.line-drop-marker {
  position: absolute;
  left: 56px;
  right: 22px;
  z-index: 4;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 122, 114, 0.14);
  opacity: 0;
  pointer-events: none;
}

.line-drop-marker.show {
  opacity: 1;
}

.line-drag-handle {
  position: absolute;
  left: 4px;
  z-index: 5;
  width: 18px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #c6cecb;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #566068;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(33, 37, 41, 0.12);
  opacity: 0;
  pointer-events: none;
}

.line-drag-handle.show {
  opacity: 1;
  pointer-events: auto;
  cursor: grab;
}

.line-drag-handle.dragging {
  cursor: grabbing;
}

.line-hover-stamp {
  position: absolute;
  z-index: 4;
  max-width: 190px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f363b;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(185, 194, 191, 0.78);
  opacity: 0;
  pointer-events: none;
}

.line-hover-stamp.show {
  opacity: 1;
}

.line-format-menu {
  position: absolute;
  z-index: 8;
  min-width: 132px;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid #c6cecb;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tag-autocomplete {
  position: absolute;
  z-index: 9;
  min-width: 150px;
  max-width: 260px;
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid #c6cecb;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tag-autocomplete[hidden] {
  display: none !important;
}

.tag-suggestion {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 6px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.tag-suggestion:hover,
.tag-suggestion.active {
  background: var(--accent-soft);
}

.line-format-menu[hidden] {
  display: none;
}

.line-format-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  text-align: left;
  font-size: 13px;
}

.line-format-menu button:hover,
.line-format-menu button:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.pinned-context-menu,
.kanban-context-menu {
  position: fixed;
  z-index: 20;
  min-width: 120px;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid #c6cecb;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pinned-context-menu[hidden],
.kanban-context-menu[hidden] {
  display: none;
}

.pinned-context-menu button,
.kanban-context-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  text-align: left;
  font-size: 13px;
}

.pinned-context-menu button:hover,
.pinned-context-menu button:focus-visible,
.kanban-context-menu button:hover,
.kanban-context-menu button:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

#editor {
  z-index: 2;
  resize: none;
  border: 0;
  outline: none;
  overflow: auto;
  background: transparent !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
  visibility: visible !important;
  mix-blend-mode: normal !important;
  caret-color: var(--ink);
}

#editor::selection {
  background: rgba(255, 225, 82, 0.55);
}

.editor-hash {
  display: inline;
  border-radius: 3px;
  background: var(--hash-bg, #edf3f2);
  box-shadow: 0 0 0 2px var(--hash-bg, #edf3f2);
  color: transparent;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hash-text, var(--ink));
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

#editor.has-hover-hash {
  cursor: pointer;
}

.result-hash {
  display: inline;
  border-radius: 3px;
  background: var(--hash-bg, #edf3f2);
  box-shadow: 0 0 0 2px var(--hash-bg, #edf3f2);
  color: var(--hash-text, var(--ink));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  margin-bottom: 12px;
}

.search-row input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  padding: 0 10px;
}

.outline-list {
  display: grid;
  gap: 8px;
}

.outline-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.outline-item.depth-1 {
  margin-left: 10px;
  width: calc(100% - 10px);
}

.outline-item.depth-2,
.outline-item.depth-3,
.outline-item.depth-4 {
  margin-left: 20px;
  width: calc(100% - 20px);
}

.outline-item.done .outline-copy {
  color: var(--done);
  text-decoration: line-through;
}

.outline-item.heading .outline-copy {
  font-weight: 800;
}

.outline-check {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid #b9c2bf;
  border-radius: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.outline-item:not(.task) .outline-check {
  border-color: transparent;
}

.outline-item.done .outline-check::before {
  content: "x";
}

.outline-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

.hash-chip {
  display: inline-flex;
  align-items: center;
  max-width: 132px;
  margin: 0 2px;
  padding: 1px 5px 2px;
  border: 1px solid var(--hash-border, #bed4d1);
  border-radius: 4px;
  background: var(--hash-bg, #edf3f2);
  color: var(--hash-text, var(--ink));
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
  vertical-align: 1px;
  cursor: pointer;
}

.hash-chip:hover {
  box-shadow: 0 0 0 2px var(--hash-ring, rgba(21, 122, 114, 0.16));
}

.due-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  padding: 1px 6px;
  border: 1px solid #646456;
  border-radius: 6px;
  background: #2d2d27;
  color: #d8d5bd;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.25;
}

.line-due-badge {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
  cursor: text;
  box-shadow: 0 0 0 2px #1b1b18;
}

.shortcuts-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
}

.shortcuts-modal[hidden] {
  display: none !important;
}

.shortcuts-card {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shortcuts-card > .icon-button {
  position: absolute;
  right: 12px;
  top: 12px;
}

.quickstart-card {
  width: min(680px, calc(100vw - 40px));
}

.quickstart-body {
  display: grid;
  gap: 14px;
}

.quickstart-body section {
  display: grid;
  gap: 4px;
}

.quickstart-body h3,
.quickstart-body p {
  margin: 0;
}

.quickstart-body h3 {
  font-size: 14px;
}

.quickstart-body p {
  color: var(--muted);
  line-height: 1.5;
}

.outline-meta {
  grid-column: 3;
  grid-row: 1;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.outline-created {
  grid-column: 2 / 4;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4d555b;
  font-size: 10px;
  line-height: 1.2;
}

.outline-empty {
  border: 1px dashed #c6cecb;
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.45;
}

.saving {
  color: var(--warn);
}

.saved {
  color: var(--accent);
}

/* TaskTXT-inspired skin: quiet chrome, flat panels, text-first workspace. */
:root {
  --bg: #fbfbf8;
  --panel: #ffffff;
  --panel-muted: #f3f4ef;
  --ink: #202124;
  --muted: #767b80;
  --line: #dedfd8;
  --accent: #151515;
  --accent-soft: #f0f0ea;
  --warn: #8f6b16;
  --warn-soft: #fff7da;
  --danger: #b13a36;
  --shadow: 0 10px 24px rgba(25, 25, 25, 0.08);
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: var(--sans);
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-rows: 50px minmax(0, 1fr);
}

.topbar {
  gap: 12px;
  padding: 8px 14px;
  background: #fff;
  border-bottom-color: var(--line);
  backdrop-filter: none;
}

.brand {
  flex-basis: 320px;
}

.brand-mark {
  width: auto;
  height: auto;
  flex-basis: auto;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
}

.title-input {
  font-size: 16px;
  font-weight: 800;
}

.page-tabs {
  gap: 4px;
}

.page-tab {
  height: 30px;
  border-color: var(--line);
  border-radius: 5px;
  background: #fff;
  color: #666a6e;
  font-weight: 800;
}

.page-tab.active {
  border-color: #1f1f1f;
  background: #f7f7f2;
  color: #111;
}

.toolbar {
  gap: 6px;
}

.icon-button,
.text-button {
  height: 32px;
  border-color: var(--line);
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}

.icon-button {
  width: 32px;
}

.text-button {
  padding: 0 10px;
  font-size: 13px;
}

.workspace {
  grid-template-columns: 230px minmax(360px, 1fr) 300px;
}

.workspace.tag-open {
  grid-template-columns: 230px 260px minmax(360px, 1fr) 300px;
}

.sidebar,
.outline-pane,
.tag-results-pane {
  background: var(--panel-muted);
}

.sidebar,
.tag-results-pane,
.outline-pane {
  padding: 12px;
}

.summary-grid {
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.summary-item {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 8px 10px;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item span {
  color: #111;
  font-size: 17px;
}

.summary-item small,
.facet-block h2,
.pinned-pane h2 {
  color: #6f7479;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.view-list,
.facet-list,
.pinned-list,
.tag-results-list,
.outline-list {
  gap: 5px;
}

.view-button,
.facet-pill {
  min-height: 30px;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 13px;
}

.view-button strong,
.facet-pill strong {
  min-width: 20px;
  padding: 1px 5px;
  background: #e7e8e2;
  font-size: 11px;
}

.view-button.active,
.facet-pill.active {
  border-color: #c9cbc2;
  background: #edede8;
}

.hash-pill,
.hash-pill:hover,
.hash-pill.active {
  border-color: var(--hash-border, #c8cbc2);
  background: var(--hash-bg, #f2f2ed);
}

.facet-block {
  margin-top: 16px;
}

.rule-list dt,
.shortcut-list dt {
  border-radius: 4px;
  background: #fff;
}

.editor-pane {
  background: #fff;
}

.editor-status {
  height: 32px;
  padding: 0 12px;
  background: #fff;
  font-size: 11px;
}

.editor-wrap {
  background: #fff;
}

#editor,
.editor-highlight {
  padding: 18px 26px 80px 58px;
  font-size: 14px;
  line-height: 1.72;
}

.line-marker {
  left: 52px;
  right: 18px;
  border-radius: 3px;
}

.line-drag-handle {
  left: 8px;
  width: 16px;
  height: 20px;
  border-radius: 4px;
  box-shadow: none;
}

.pinned-pane {
  max-height: 150px;
  background: #fbfbf8;
  padding: 7px 12px 8px;
}

.pinned-item,
.tag-result,
.outline-item,
.outline-empty {
  border-color: var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.pinned-item,
.tag-result,
.outline-item {
  background: #fff;
}

.pinned-item {
  padding: 6px 7px;
}

.tag-result {
  padding: 8px 9px;
}

.outline-item {
  padding: 8px 9px;
}

.search-row input,
.history-panel summary {
  height: 32px;
  min-height: 32px;
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
}

.tag-results-head h2,
.hash-chip {
  border-radius: 4px;
}

.line-format-menu,
.pinned-context-menu,
.kanban-context-menu,
.tag-autocomplete {
  border-radius: 5px;
  box-shadow: var(--shadow);
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 220px minmax(320px, 1fr);
    grid-template-rows: minmax(0, 1fr) 260px;
    grid-template-areas:
      "sidebar editor"
      "outline outline";
  }

  .workspace.tag-open {
    grid-template-columns: 220px 260px minmax(320px, 1fr);
    grid-template-areas:
      "sidebar tags editor"
      "outline outline outline";
  }

  .outline-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr) 260px;
    grid-template-areas:
      "sidebar"
      "editor"
      "outline";
  }

  .workspace.tag-open {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(420px, 1fr) 260px;
    grid-template-areas:
      "sidebar"
      "tags"
      "editor"
      "outline";
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
  }

  .view-list,
  .facet-list {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  }

  .facet-block {
    margin-top: 12px;
  }

  .outline-pane {
    border-left: 0;
  }

  .tag-results-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor-wrap {
    min-height: 420px;
  }

  #editor,
  .editor-highlight {
    padding: 16px 14px 72px 54px;
    font-size: 14px;
  }

  .line-marker {
    left: 48px;
    right: 14px;
  }

  .line-drop-marker {
    left: 48px;
    right: 14px;
  }

  .line-drag-handle {
    left: 2px;
  }

  .collapsed-cover {
    left: 48px;
    right: 14px;
  }
}

/* TaskTXT dark skin. */
:root {
  color-scheme: dark;
  --bg: #1b1b1b;
  --panel: #1f1f1f;
  --panel-muted: #242424;
  --ink: #e9e8e3;
  --muted: #a6aaa9;
  --line: #383838;
  --accent: #f3f2ec;
  --accent-soft: #303030;
  --warn: #d8b45b;
  --warn-soft: #332a18;
  --done: #7f8588;
  --danger: #ff7a7a;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

body,
.app-shell,
.editor-pane,
.editor-wrap {
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  background: #202020;
  border-bottom-color: var(--line);
}

.brand-mark {
  border-color: transparent;
  background: transparent;
  color: #f4f4ef;
}

.title-input,
#editor {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

#editor {
  caret-color: #ffffff;
}

.sidebar,
.outline-pane,
.tag-results-pane {
  background: #242424;
}

.editor-status,
.pinned-pane {
  background: #1f1f1f;
  border-color: var(--line);
}

.page-tab,
.icon-button,
.text-button,
.summary-grid,
.rule-list dt,
.shortcut-list dt,
.search-row input,
.history-panel summary,
.pinned-item,
.tag-result,
.outline-item,
.line-format-menu,
.pinned-context-menu,
.kanban-context-menu,
.tag-autocomplete {
  border-color: var(--line);
  background: #242424;
  color: var(--ink);
}

.page-tab {
  color: #a7aaa8;
}

.page-tab.active,
.view-button.active,
.facet-pill.active {
  border-color: #575757;
  background: #303030;
  color: #ffffff;
}

.icon-button:hover,
.text-button:hover,
.view-button:hover,
.facet-pill:hover,
.tag-result:hover,
.outline-item:hover,
.pinned-item:hover {
  border-color: #565656;
  background: #2c2c2c;
}

.summary-item {
  border-color: var(--line);
}

.summary-item span,
.rule-list code {
  color: #f0efe9;
}

.view-button,
.facet-pill {
  color: var(--ink);
}

.view-button strong,
.facet-pill strong {
  background: #343434;
  color: #c9cccc;
}

.view-button.active strong,
.facet-pill.active strong {
  background: #f0efe9;
  color: #191919;
}

.outline-empty {
  border-color: #444;
  background: #202020;
  color: var(--muted);
}

.hash-pill strong {
  background: rgba(20, 20, 20, 0.72);
}

.line-created,
.pinned-meta,
.outline-created {
  color: #777d7d;
}

.line-marker {
  background: rgba(255, 214, 68, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 214, 68, 0.58);
}

.collapse-line,
.bullet-line,
.line-drag-handle,
.line-hover-stamp {
  border-color: #4a4a4a;
  background: #252525;
  color: #ecebe3;
  box-shadow: none;
}

.group-guide {
  background: rgba(156, 162, 162, 0.46);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.editor-hash,
.result-hash {
  box-shadow: 0 0 0 2px var(--hash-bg), 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.hash-chip,
.hash-pill {
  color: var(--hash-text, #f0efe9);
}

.collapsed-count {
  position: absolute;
  z-index: 3;
  color: #878d8d;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  pointer-events: none;
}

.check-line {
  accent-color: #d7d6cf;
}

.line-format-menu button,
.pinned-context-menu button,
.kanban-context-menu button,
.tag-suggestion {
  color: var(--ink);
}

.line-format-menu button:hover,
.line-format-menu button:focus-visible,
.pinned-context-menu button:hover,
.pinned-context-menu button:focus-visible,
.kanban-context-menu button:hover,
.kanban-context-menu button:focus-visible,
.tag-suggestion:hover,
.tag-suggestion.active {
  background: #303030;
}

.kanban-pane,
.kanban-card {
  background: var(--panel);
}

.kanban-card {
  border-color: var(--line);
}

.short-link,
.tag-result-page,
.saved {
  color: #cfcfc8;
}

.saving {
  color: var(--warn);
}

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.34);
}

.command-overlay[hidden] {
  display: none;
}

.command-palette {
  width: min(620px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #474747;
  border-radius: 6px;
  background: #222;
  box-shadow: var(--shadow);
}

#commandInput {
  width: 100%;
  height: 44px;
  border: 0;
  border-bottom: 1px solid #3b3b3b;
  background: #202020;
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  font-size: 14px;
}

.command-list {
  max-height: min(430px, 60vh);
  overflow: auto;
  padding: 6px;
}

.command-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
}

.command-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.command-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.command-item.active,
.command-item:hover {
  border-color: #4b4b4b;
  background: #303030;
}

.command-item:disabled {
  opacity: 0.52;
  cursor: default;
}

.command-empty {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
}
:root {
  color-scheme: light dark;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
}

.auth-shell[hidden] {
  display: none;
}

.auth-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel h1 {
  margin: 0;
  font-size: 24px;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-panel strong {
  color: var(--ink);
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-panel form,
.auth-panel label,
.recovery-box {
  display: grid;
  gap: 8px;
}

.recovery-box {
  padding-top: 4px;
}

.recovery-box summary {
  cursor: pointer;
  font-weight: 700;
}

.auth-panel input {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  padding: 10px;
  font: inherit;
}

.auth-message {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 20px;
  color: var(--muted);
  text-align: center;
}

.inline-message {
  position: static;
  min-height: 20px;
  margin: 0;
  text-align: left;
}

.admin-panel {
  width: min(720px, 100%);
}

.instance-list {
  display: grid;
  gap: 8px;
}

.instance-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}

.instance-row span,
.instance-row code {
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu-button,
.mobile-sidebar-close,
.tabs-label {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    min-height: 100%;
    overflow: auto;
  }

  .auth-shell {
    align-items: start;
    padding: 16px;
  }

  .auth-panel {
    width: 100%;
    padding: 18px;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .brand {
    width: 100%;
    flex-basis: auto;
    gap: 8px;
    flex-direction: row;
    align-items: center;
  }

  .brand-mark {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .title-input {
    min-width: 0;
    font-size: 15px;
    color: #f0a33a !important;
    -webkit-text-fill-color: #f0a33a !important;
  }

  .page-tabs {
    width: 100%;
    min-width: 0;
    order: 2;
    gap: 7px;
  }

  .tabs-label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .page-tab {
    max-width: 150px;
    flex: 0 0 auto;
  }

  .toolbar {
    width: 100%;
    order: 3;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .icon-button,
  .text-button {
    min-width: 36px;
    min-height: 36px;
  }

  .toolbar > .text-button {
    flex: 0 0 auto;
  }

  .toolbar-menu-list {
    left: 0;
    right: auto;
  }

  .mobile-menu-button,
  .mobile-sidebar-close {
    display: inline-flex;
  }

  .mobile-menu-button {
    flex: 0 0 36px;
    padding: 0;
    font-size: 18px;
  }

  .workspace,
  .workspace.tag-open,
  .workspace.kanban-open {
    height: auto;
    min-height: 0;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(68vh, auto) auto auto;
    grid-template-areas:
      "editor"
      "tags"
      "outline";
  }

  .workspace.kanban-open {
    grid-template-rows: minmax(65vh, auto);
    grid-template-areas:
      "kanban";
  }

  .workspace.kanban-open .kanban-pane {
    display: grid;
  }

  .sidebar,
  .tag-results-pane,
  .outline-pane {
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-right: 0;
    padding: 10px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(340px, 88vw);
    max-height: 100dvh;
    overflow: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 160ms ease;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.42);
  }

  .mobile-sidebar-close {
    width: 100%;
    margin-bottom: 10px;
    justify-content: center;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 10px;
  }

  .summary-item {
    min-width: 0;
    padding: 8px;
  }

  .facet-block {
    margin-top: 10px;
  }

  .view-list,
  .facet-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .view-button,
  .facet-pill {
    min-width: max-content;
    flex: 0 0 auto;
  }

  .rules-block {
    display: none;
  }

  .tag-results-pane[hidden] {
    display: none !important;
  }

  .tag-results-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .tag-result {
    min-width: min(280px, 82vw);
  }

  .editor-pane {
    min-height: 68vh;
    grid-template-rows: 34px auto minmax(68vh, 1fr);
  }

  .editor-wrap {
    min-height: 68vh;
  }

  #editor,
  .editor-highlight {
    padding: 16px 12px 88px 46px;
    font-size: 14px;
    line-height: 1.65;
  }

  .line-marker,
  .line-drop-marker,
  .collapsed-cover {
    left: 42px;
    right: 12px;
  }

  .line-drag-handle {
    left: 4px;
  }

  .outline-pane {
    border-top: 1px solid var(--line);
  }

  .history-body {
    max-height: 220px;
    overflow: auto;
  }

  .kanban-pane {
    min-height: 65vh;
    padding: 12px;
    overflow: hidden;
  }

  .kanban-head {
    height: auto;
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .kanban-board {
    height: auto;
    min-height: 0;
    grid-auto-columns: minmax(250px, 82vw);
    padding-bottom: 12px;
  }

  .shortcuts-card,
  .quickstart-card,
  .command-palette {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 420px) {
  .toolbar .text-button {
    padding: 0 8px;
    font-size: 12px;
  }

  .title-input {
    width: 100%;
  }
}
