:root {
  --bg-1: #f8f4ea;
  --bg-2: #e8f0e8;
  --ink: #1e1d1c;
  --muted: #6f6a61;
  --line: #1e1d1c;
  --lane: rgba(255, 255, 255, 0.72);
  --bubble: #fffef9;
  --bubble-hover: #f7f2e3;
  --accent: #11795b;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 20%, #fff8df 0%, transparent 38%),
    radial-gradient(circle at 85% 85%, #d5f2e2 0%, transparent 42%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  padding: 1.5rem;
}

body.dino-mode {
  background: #000;
  color: #fff;
  padding: 0;
  overflow: hidden;
  font-family: "Courier New", "Lucida Console", Monaco, monospace;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.app-header {
  margin-bottom: 1.2rem;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.header-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 2rem;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.34rem;
  max-width: min(52vw, 620px);
}

.filter-chip {
  --chip-color: var(--line);
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--chip-color);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.25rem 0.95rem 0.25rem 0.56rem;
  min-height: 1.52rem;
  white-space: nowrap;
  transition: box-shadow 180ms ease, opacity 180ms ease;
}

.filter-chip-label {
  display: inline-block;
  padding-right: 0.15rem;
}

.filter-chip-draggable {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.filter-chip-dragging {
  opacity: 0.94;
  cursor: grabbing;
}

.filter-chip-floating {
  transition: none;
  box-shadow: 0 12px 30px rgba(26, 24, 21, 0.16);
  transform: scale(1.03);
}

.filter-chip-placeholder {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--chip-color) 30%, rgba(30, 29, 28, 0.28));
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

body.filter-chip-reorder-active {
  user-select: none;
  cursor: grabbing;
}

.filter-chip-close {
  position: absolute;
  top: 0.14rem;
  right: 0.2rem;
  width: 0.7rem;
  height: 0.7rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--chip-color);
  font: inherit;
  font-size: 0.56rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.82;
}

.filter-chip-close:hover {
  opacity: 1;
}

.filter-chip-overflow {
  border-color: #c6c2ba;
  color: #6d685f;
  background: #f2f2f0;
  padding-right: 0.56rem;
}

.filter-chip-empty {
  border-style: dashed;
  border-color: #b7b2aa;
  color: #7d7770;
}

.brand-kicker {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.1rem, 2.7vw, 1.8rem);
}

.sync-status {
  margin: 0.32rem 0 0;
  font-size: 0.85rem;
  color: #7f2a2a;
}

.dino-fallback {
  min-height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  padding: 0.9rem;
}

.dino-terminal {
  width: min(100%, 1080px);
  display: grid;
  gap: 0.5rem;
}

.dino-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: clamp(0.74rem, 1.35vw, 0.98rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.96;
}

.dino-ascii {
  margin: 0;
  border: 1px solid #ffffff55;
  border-radius: 0;
  background: #000;
  color: #fff;
  padding: 0.75rem;
  line-height: 1.02;
  letter-spacing: 0;
  font-size: clamp(8.7px, 1.22vw, 13px);
  white-space: pre;
  user-select: none;
  overflow: hidden;
}

.filter-word {
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(0.85rem, 1.45vw, 1.02rem);
  line-height: 1;
  padding: 0;
  margin-right: 10px;
  margin-bottom: 0.18rem;
  cursor: pointer;
  text-transform: lowercase;
}

.filter-word:hover {
  color: #2b2a29;
}

.search-word {
  border: none;
  background: transparent;
  color: #4e4a42;
  font: inherit;
  font-size: 1.24rem;
  line-height: 1;
  padding: 0 0.08rem;
  margin-right: 0.28rem;
  margin-bottom: 0.16rem;
  cursor: pointer;
}

.search-word:hover {
  color: #1e1d1c;
}

.settings-dots {
  border: none;
  background: transparent;
  color: #535049;
  margin-right: 0.55rem;
  margin-bottom: 0.18rem;
  padding: 0.04rem 0.08rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  opacity: 0.69;
  cursor: pointer;
  transform: translateY(-2px);
}

.settings-dots span {
  width: 0.16rem;
  height: 0.16rem;
  border-radius: 999px;
  background: currentColor;
  display: block;
}

.settings-dots:hover {
  opacity: 0.94;
}

.settings-dots:focus-visible {
  opacity: 0.94;
  outline: 1px solid #8f8a82;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.desktop-header-row {
  align-items: flex-end;
  gap: 1rem;
}

.desktop-header-row > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.desktop-header-controls {
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 2rem;
  flex: 0 0 auto;
}

.desktop-header-controls .active-filter-chips {
  max-width: min(36vw, 420px);
}

.desktop-header-controls .filter-word {
  margin-right: 10px;
  margin-bottom: 0.18rem;
}

.header-quick-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.desktop-header-controls .settings-dots {
  margin-right: 0.55rem;
  margin-bottom: 0.18rem;
  padding: 0.04rem 0.08rem;
  flex-direction: row;
  gap: 0.16rem;
  transform: translateY(-2px);
}

.desktop-header-controls .settings-dots[aria-expanded="true"] {
  opacity: 0.94;
}

.desktop-header-controls .settings-dots span {
  width: 0.18rem;
  height: 0.18rem;
}

.header-quick-menu {
  position: absolute;
  top: calc(100% + 0.72rem);
  right: 0;
  min-width: 13rem;
  padding: 0.88rem 0.95rem 0.82rem;
  border: 1.5px solid rgba(45, 43, 39, 0.16);
  border-radius: 0.95rem;
  background: rgba(255, 252, 245, 0.97);
  box-shadow: 0 18px 42px rgba(27, 25, 22, 0.12);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 0.72rem;
  z-index: 30;
}

.header-quick-menu .auth-indicator {
  display: grid;
  gap: 0.18rem;
  justify-items: start;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(45, 43, 39, 0.1);
}

.header-quick-menu .auth-indicator.hidden {
  display: none;
}

.header-quick-menu .auth-indicator button {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  color: #6b655d;
}

.header-quick-menu #auth-indicator-email {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #6b655d;
  word-break: break-word;
}

.header-quick-links {
  display: grid;
  gap: 0.14rem;
}

.header-quick-link {
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: left;
  padding: 0.16rem 0;
  cursor: pointer;
  text-transform: lowercase;
}

.header-quick-link:hover {
  color: #232220;
}

.header-quick-link:focus-visible {
  outline: 1px solid rgba(45, 43, 39, 0.34);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.header-quick-menu .header-quick-logout {
  padding-top: 0.04rem;
}

.board {
  border: 4px solid var(--line);
  border-radius: 1rem;
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1fr 1fr 1fr;
  overflow: hidden;
  min-height: 72vh;
  backdrop-filter: blur(8px);
}

.app-footer {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.app-footer-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  flex-wrap: wrap;
  justify-content: center;
}

.app-footer-link {
  color: #a39d93;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: none;
}

.app-footer-link:hover {
  color: #7d766d;
}

.app-footer-sep {
  color: #d1cbc1;
  font-size: 0.7rem;
  line-height: 1;
}

.lane {
  border-right: 2px solid var(--line);
  background: var(--lane);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.lane:last-child {
  border-right: none;
}

.inbox-lane {
  position: relative;
  padding: 0;
  gap: 0;
}

.inbox-top {
  flex: 1;
  border-bottom: 3px solid var(--line);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

h2 {
  margin: 0;
  font-size: 1.08rem;
}

.bubble-list {
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.lane-group {
  width: 100%;
  display: grid;
  gap: 0.42rem;
}

.lane-group-inbox {
  gap: 0.58rem;
}

.lane-group + .lane-group {
  margin-top: 0.3rem;
}

.lane-group-bubbles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.lane-group-temporary {
  opacity: 0.9;
}

.lane-group-header {
  --lane-group-accent: #cdc5b8;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 2rem;
  padding: 0.24rem 0.72rem 0.2rem;
  border-radius: 0.52rem;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--lane-group-accent) 10%, #fffaf2) 0%,
      rgba(255, 250, 242, 0.7) 100%
    );
  color: color-mix(in srgb, var(--lane-group-accent) 38%, #746c61);
}

.lane-group-header-no-label {
  --lane-group-accent: #d6d1c9;
  color: #7d756b;
}

.lane-group-label {
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lane-group-header-no-label .lane-group-label {
  letter-spacing: 0.03em;
  text-transform: none;
}

.lane-group-count {
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 500;
  opacity: 0.82;
}

.lane-thought-item {
  display: grid;
  justify-items: start;
  gap: 0;
  width: fit-content;
  max-width: 100%;
}

.inbox-bubble-item {
  gap: 0.12rem;
}

.inbox-bubble-category-label {
  --inbox-bubble-label-color: #7a746c;
  padding-left: 0.34rem;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--inbox-bubble-label-color) 62%, #6f6a61);
  opacity: 0.92;
  pointer-events: none;
  user-select: none;
}

.lane-thought-placeholder {
  border: 1.6px dashed rgba(44, 39, 34, 0.22);
  border-radius: 1.15rem;
  background: rgba(255, 253, 246, 0.7);
  box-sizing: border-box;
}

.system-invite-card {
  width: min(100%, 22rem);
  border: 2px solid var(--line);
  border-left: 8px solid var(--invite-accent, #1e1d1c);
  border-radius: 0.76rem;
  background: #edf4fb;
  padding: 0.6rem 0.68rem 0.58rem;
  display: grid;
  gap: 0.44rem;
  box-shadow: 0 4px 0 rgba(30, 29, 28, 0.12);
}

.system-invite-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.system-invite-head h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.system-invite-badge {
  border: 1.4px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.18rem 0.48rem;
  white-space: nowrap;
}

.system-invite-body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.28;
  color: #2a2928;
}

.system-invite-actions {
  display: flex;
  justify-content: flex-end;
}

.system-invite-accept {
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #151413;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.26rem 0.62rem;
  cursor: pointer;
}

.system-invite-accept[disabled] {
  opacity: 0.58;
  cursor: default;
}

.system-inbox-card-wrap {
  position: relative;
}

.system-inbox-card {
  width: 100%;
  border: 2px solid #d6c7a8;
  border-radius: 0.92rem;
  background:
    radial-gradient(circle at 85% 14%, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(155deg, #fffdf7 0%, #f3fbf7 58%, #e8f6f0 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 20px rgba(32, 27, 18, 0.11);
  padding: 0.72rem;
  display: grid;
  gap: 0.58rem;
  text-align: left;
  color: #1f1d1a;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.system-inbox-card-dismiss {
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 1.7px solid #2f2b25;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #171513;
  font: inherit;
  font-size: 1.24rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.system-inbox-card-dismiss:hover {
  transform: scale(1.04);
  background: #fff;
  border-color: #161412;
}

.system-inbox-card-dismiss:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.system-inbox-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--system-card-accent, #1d8b74) 42%, #c6b388);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 14px 24px rgba(32, 27, 18, 0.13);
}

.system-inbox-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.system-inbox-card-kicker {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: color-mix(in srgb, var(--system-card-accent, #1d8b74) 88%, #16382f);
}

.system-inbox-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0.62rem;
}

.system-inbox-card-content {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.system-inbox-card-title {
  margin: 0;
  color: #1c1916;
  font-size: clamp(1.1rem, 1.36vw, 1.42rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.system-inbox-card-body {
  margin: 0;
  color: #4f493f;
  font-size: 0.88rem;
  line-height: 1.33;
}

.system-inbox-card-bullets {
  margin: 0.12rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.24rem;
  color: #2f2a23;
  font-size: 0.84rem;
  line-height: 1.24;
}

.system-inbox-card-bullets li {
  position: relative;
  padding-left: 1.05rem;
}

.system-inbox-card-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: color-mix(in srgb, var(--system-card-accent, #1d8b74) 88%, #164236);
  font-weight: 900;
}

.system-inbox-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 0.14rem;
  border: 1.7px solid color-mix(in srgb, var(--system-card-accent, #1d8b74) 88%, #164236);
  border-radius: 999px;
  background: color-mix(in srgb, var(--system-card-accent, #1d8b74) 16%, #ffffff);
  color: color-mix(in srgb, var(--system-card-accent, #1d8b74) 92%, #15382f);
  font-size: 0.84rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.34rem 0.74rem;
}

.system-inbox-card-media {
  width: min(7.15rem, 34vw);
  align-self: stretch;
}

.system-inbox-card-media img {
  width: 100%;
  height: 100%;
  min-height: 6.05rem;
  object-fit: cover;
  border-radius: 0.72rem;
  border: 1.6px solid rgba(34, 28, 20, 0.2);
  display: block;
}

.bubble {
  border: 1.8px solid var(--line);
  border-radius: 999px;
  background: var(--bubble);
  padding: 0.28rem 0.85rem;
  cursor: grab;
  font-size: 0.96rem;
  text-align: left;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 120ms ease, background-color 120ms ease;
}

body.bubble-reorder-active {
  cursor: grabbing;
}

.bubble:hover {
  background: var(--bubble-hover);
  transform: translateY(-1px);
}

.bubble:active {
  cursor: grabbing;
}

.bubble.dragging {
  opacity: 0.45;
}

.lane-thought-item-dragging {
  opacity: 0.97;
}

.lane-thought-item-source-hidden {
  display: none !important;
}

.lane-thought-item-floating {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1250;
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(26, 22, 18, 0.18));
}

.lane-thought-item-floating .bubble {
  transform: none;
}

.lane-thought-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1250;
  pointer-events: none;
  margin: 0;
  filter: drop-shadow(0 10px 22px rgba(26, 22, 18, 0.18));
}

.lane-thought-ghost .bubble {
  transform: none;
}

.bubble.tutorial-board-pending {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.bubble.tutorial-board-enter {
  animation: tutorialBoardBubbleEnter 420ms ease forwards;
}

.bubble.tutorial-ghost-bubble {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  border-style: dashed;
  background: #fffeff;
  opacity: 0;
  transition: transform 1880ms cubic-bezier(0.22, 0.7, 0.15, 1), opacity 220ms ease;
}

.bubble.tutorial-ghost-bubble.tutorial-ghost-active {
  opacity: 0.82;
}

.bubble.tutorial-ghost-bubble.tutorial-ghost-fade {
  opacity: 0;
}

.bubble-touch-ghost {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  z-index: 160;
  pointer-events: none;
  opacity: 0.94;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.modal-card.finish-modal-crumbling {
  overflow: visible;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.modal-card.finish-modal-crumbling > *:not(.finish-modal-pixels) {
  opacity: 0;
  transition: opacity 220ms ease;
}

.finish-modal-pixels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.finish-modal-pixel {
  position: absolute;
  left: var(--px);
  top: var(--py);
  width: 4px;
  height: 4px;
  border-radius: 1px;
  opacity: 0;
  transform: translate(0, 0) scale(0.7);
}

.modal-card.finish-modal-crumbling.is-crumbling .finish-modal-pixel {
  animation: finishPixelFall 980ms cubic-bezier(0.2, 0.74, 0.24, 1) forwards;
  animation-delay: var(--delay);
}

.bubble.finish-bubble-hidden {
  opacity: 0 !important;
}

.finish-bubble-overlay {
  position: fixed;
  z-index: 174;
  border: 1.8px solid var(--line);
  border-radius: 999px;
  background: var(--bubble);
  pointer-events: none;
  overflow: visible;
}

.finish-bubble-overlay-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.96rem;
  color: var(--ink);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 220ms ease;
}

.finish-bubble-pixel {
  position: absolute;
  left: var(--px);
  top: var(--py);
  width: 4px;
  height: 4px;
  border-radius: 1px;
  opacity: 0;
  transform: translate(0, 0) scale(0.7);
}

.finish-bubble-border-pixel {
  width: 5px;
  height: 5px;
}

.finish-bubble-overlay.is-crumbling {
  background: transparent;
  border-color: transparent;
}

.finish-bubble-overlay.is-crumbling .finish-bubble-overlay-label {
  opacity: 0;
}

.finish-bubble-overlay.is-crumbling .finish-bubble-pixel {
  animation: finishPixelFall 980ms cubic-bezier(0.2, 0.74, 0.24, 1) forwards;
  animation-delay: var(--delay);
}

.modal.finish-modal-shell {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

@keyframes finishPixelFall {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.85);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.45);
  }
}

.lane-dropzone.drag-over {
  background: linear-gradient(to bottom right, rgba(17, 121, 91, 0.16), rgba(17, 121, 91, 0.03));
}

.add-btn {
  border: none;
  border-top: 2px solid var(--line);
  background: #f3f3f2;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  min-height: 5.5rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.add-btn:hover {
  background: #e8ebe8;
}

.tutorial-card {
  width: calc(100% - 1rem);
  max-width: 17.5rem;
  margin: 0.6rem auto 0.52rem;
  border: 2px solid var(--line);
  border-radius: 0.72rem;
  padding: 0.58rem 0.62rem 0.54rem;
  background: #e6f3eb;
  display: grid;
  gap: 0.36rem;
  box-shadow: 0 3px 0 rgba(30, 29, 28, 0.12);
}

.tutorial-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tutorial-card h3 {
  margin: 0;
  font-size: 0.92rem;
}

.tutorial-body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.24;
  color: #1e1d1c;
}

.tutorial-close {
  width: 1.15rem;
  height: 1.15rem;
  border: 1.4px solid #9b958a;
  border-radius: 999px;
  background: #fff;
  color: #6f6a61;
  font: inherit;
  font-size: 0.62rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.tutorial-close:hover {
  color: #1e1d1c;
  border-color: #7e786f;
}

.tutorial-actions {
  display: flex;
  justify-content: flex-end;
}

.tutorial-next {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fcfff9;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.23rem 0.58rem;
  cursor: pointer;
}

.tutorial-next:hover {
  background: #f4f4f4;
}

.inbox-lane.tutorial-active .inbox-top {
  border-bottom: none;
}

.inbox-lane.tutorial-active .add-btn {
  border-top: none;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 12, 11, 0.32);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.welcome-card {
  width: min(92vw, 760px);
  border: 3px solid var(--line);
  border-radius: 1rem;
  background: #fffdf6;
  padding: 1.2rem 1.3rem 1.1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: stretch;
}

.welcome-copy {
  min-width: 0;
}

.welcome-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.welcome-subtitle {
  margin: 0.42rem 0 0;
  color: #6f6a61;
  font-size: 1rem;
}

.welcome-steps {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.28rem;
  font-size: 1.02rem;
}

.welcome-start {
  margin-top: 0.95rem;
  border: 1.8px solid var(--line);
  border-radius: 999px;
  background: #1e1d1c;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0.56rem 0.95rem;
  cursor: pointer;
}

.welcome-start:hover {
  background: #333130;
}

.welcome-status {
  min-height: 1rem;
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: #7d766d;
}

.welcome-status.error {
  color: #8c2e2e;
}

.capture-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: linear-gradient(140deg, #f8f4ea, #e8f0e8);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 1.45rem 1.8rem 1.2rem;
}

.capture-overlay-top {
  align-self: start;
  justify-self: end;
}

.capture-login-link {
  border: none;
  background: transparent;
  color: #5d564d;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.24rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18rem;
}

.capture-login-link:hover,
.capture-login-link:focus-visible {
  color: #2a2723;
}

.capture-card {
  width: min(94vw, 980px);
  min-height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: block;
  justify-self: center;
  align-self: center;
  margin-top: 1.35rem;
}

.capture-main {
  width: min(100%, 44rem);
  min-width: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 4.5rem 3.4rem 1.1rem;
  justify-items: center;
  gap: 0.58rem;
  align-content: center;
  transition: gap 1460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.capture-main.capture-main-complete.capture-main-shifted {
  grid-template-rows: 0 0 4.5rem 3.4rem 1.1rem;
  gap: 0.9rem;
}

.capture-prompt-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.65vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: none;
  text-align: center;
  white-space: nowrap;
  transition: opacity 760ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.capture-main.capture-main-complete .capture-prompt-title {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.capture-form {
  width: min(100%, 21.7rem);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 0.82rem;
  min-height: 3rem;
  opacity: 1;
  transition: opacity 760ms ease 120ms, transform 980ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}

.capture-form.capture-form-hidden {
  opacity: 0;
}

.capture-main.capture-main-complete .capture-form {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.capture-legal-links {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 0.42rem;
  font-size: 0.76rem;
  line-height: 1;
  color: #9f988d;
}

.capture-overlay.capture-overlay-entering .capture-prompt-title,
.capture-overlay.capture-overlay-entering .capture-form {
  opacity: 0;
}

.capture-overlay.capture-overlay-entering .capture-prompt-title {
  animation: captureOverlayIntroFade 3000ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

.capture-overlay.capture-overlay-entering .capture-form {
  animation: captureOverlayIntroFade 2000ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms both;
}

.capture-legal-links a {
  color: inherit;
  text-decoration: none;
}

.capture-legal-links a:hover,
.capture-legal-links a:focus-visible {
  color: #8c867d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.capture-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: 2.2px solid #1e1d1c;
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  background: #fffdf7;
  color: #1e1d1c;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.capture-form input:focus,
.capture-form input:focus-visible {
  outline: none;
  border-color: #1e1d1c;
  box-shadow: 0 0 0 1px #1e1d1c;
}

.capture-form input:disabled {
  background: #f1efea;
  color: #7f7a71;
}

.capture-add,
.capture-start {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
}

.capture-add {
  position: absolute;
  left: calc(100% + 0.82rem);
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #4f493f;
  padding: 0.18rem 0;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 220ms ease, color 120ms ease;
}

.capture-form.capture-add-visible .capture-add {
  opacity: 1;
  pointer-events: auto;
}

.capture-add:hover,
.capture-add:focus-visible {
  color: #1e1d1c;
}
.capture-start {
  justify-self: center;
  margin-top: 0;
  border: none;
  background: transparent;
  color: #1e1d1c;
  padding: 0;
  text-transform: none;
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.capture-start:hover {
  color: #3d3933;
}

.capture-start:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

#capture-start:not([hidden]) {
  animation: captureStartFadeIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.capture-list {
  width: min(100%, 30rem);
  min-height: 4.5rem;
  max-height: 4.5rem;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 0.62rem;
  padding-top: 0.18rem;
  transition: transform 7800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.capture-main.capture-main-complete.capture-main-shifted .capture-list {
  justify-content: center;
  padding-top: 0;
}

.capture-pill {
  display: inline-flex;
  align-items: center;
  border: 1.8px solid var(--line);
  border-radius: 999px;
  background: var(--bubble);
  color: var(--ink);
  padding: 0.28rem 0.85rem;
  font-size: 0.96rem;
  line-height: 1.05;
}

.capture-pill-flip,
.capture-list-flip {
  will-change: transform;
  transition: transform 7800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.capture-pill-enter {
  opacity: 0;
  animation: capturePillEnter 360ms ease forwards;
}

.capture-status {
  margin: 0.08rem 0 0;
  min-height: 1rem;
  width: 100%;
  font-size: 0.82rem;
  color: #7d766d;
  text-align: center;
}

.capture-status.error {
  color: #8c2e2e;
}

.plus-arrow-guide {
  position: absolute;
  left: 50%;
  bottom: 3.2rem;
  transform: translateX(-50%);
  z-index: 7;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  pointer-events: none;
  animation: plusGuideFadeIn 650ms ease forwards;
}

.plus-arrow-guide-label {
  border: 1.5px solid #1e1d1c;
  border-radius: 0.44rem;
  background: #1e1d1c;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.24rem 0.5rem;
  animation: plusGuideFloat 1.35s ease-in-out infinite;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
}

.plus-arrow-guide-icon {
  font-size: 3.2rem;
  line-height: 1;
  color: #11795b;
  font-weight: 700;
  animation: plusArrowBounce 0.9s ease-in-out infinite;
}

@keyframes plusArrowBounce {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(7px);
    opacity: 0.92;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes tutorialBoardBubbleEnter {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes capturePillEnter {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes plusGuideFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes captureStartFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes captureOverlayIntroFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes plusGuideFloat {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-3px);
    opacity: 0.96;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.welcome-preview {
  border: 2px solid #1e1d1c;
  border-radius: 0.8rem;
  background: #f2f4ef;
  padding: 0.62rem;
  display: grid;
  gap: 0.46rem;
  min-width: 0;
}

.welcome-preview-kicker {
  margin: 0;
  color: #5e5951;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-sweeper {
  border: 2px solid #1e1d1c;
  border-radius: 0.62rem;
  background: #faf9f4;
  overflow: hidden;
}

.mini-sweeper-head {
  height: 1.62rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1.5px solid #1e1d1c;
}

.mini-sweeper-head span {
  display: grid;
  place-items: center;
  font-size: 0.57rem;
  font-weight: 700;
  color: #3e3a34;
  border-right: 1px solid #1e1d1c;
}

.mini-sweeper-head span:last-child {
  border-right: none;
}

.mini-sweeper-board {
  position: relative;
  height: 8.2rem;
  background-image: linear-gradient(to right, transparent 24.9%, #1e1d1c 25%, #1e1d1c 25.6%, transparent 25.7%),
    linear-gradient(to right, transparent 49.9%, #1e1d1c 50%, #1e1d1c 50.6%, transparent 50.7%),
    linear-gradient(to right, transparent 74.9%, #1e1d1c 75%, #1e1d1c 75.6%, transparent 75.7%);
}

.mini-sweeper-bubble {
  position: absolute;
  left: 0.4rem;
  border: 1.5px solid #1e1d1c;
  border-radius: 999px;
  background: #fff;
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.2rem 0.46rem;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.mini-sweeper-bubble-one {
  top: 1.15rem;
  animation: mindSweepOne 4.6s ease-in-out infinite;
}

.mini-sweeper-bubble-two {
  top: 4.65rem;
  animation: mindSweepTwo 5.8s ease-in-out infinite;
}

@keyframes mindSweepOne {
  0% {
    transform: translateX(0);
  }
  24% {
    transform: translateX(3.8rem);
  }
  50% {
    transform: translateX(7.7rem);
  }
  76% {
    transform: translateX(11.5rem);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes mindSweepTwo {
  0% {
    transform: translateX(0);
  }
  19% {
    transform: translateX(3.8rem);
  }
  47% {
    transform: translateX(7.7rem);
  }
  72% {
    transform: translateX(11.5rem);
  }
  100% {
    transform: translateX(0);
  }
}

.modal {
  border: none;
  border-radius: 0.8rem;
  padding: 0;
  width: min(92vw, 430px);
  background: transparent;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(18, 18, 18, 0.43);
}

.modal-card {
  position: relative;
  border: 3px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fffdf6;
}

.modal-card h3 {
  margin: 0;
}

#edit-thought-form h3 {
  padding-right: 5.5rem;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
}

.modal-card label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.modal-card input:not([type="radio"]):not([type="checkbox"]):not([type="color"]),
.modal-card textarea,
.modal-card select {
  border: 1px solid #252525;
  border-radius: 0.45rem;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

.modal-card textarea {
  min-height: 5rem;
  resize: vertical;
}

.color-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.color-fieldset legend {
  padding: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.color-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-dot {
  position: relative;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--dot-color);
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.color-dot:hover {
  transform: scale(1.06);
}

#new-thought-form .color-dot::before,
#new-thought-form .color-dot::after,
#edit-thought-form .color-dot::before,
#edit-thought-form .color-dot::after {
  position: absolute;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}

#new-thought-form .color-dot::before,
#edit-thought-form .color-dot::before {
  content: attr(data-color-label);
  bottom: calc(100% + 0.45rem);
  transform: translate(-50%, 0.16rem);
  background: #1e1d1c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 0.24rem 0.42rem;
  z-index: 8;
}

#new-thought-form .color-dot::after,
#edit-thought-form .color-dot::after {
  content: "";
  bottom: calc(100% + 0.1rem);
  transform: translate(-50%, 0.16rem);
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.32rem solid #1e1d1c;
  z-index: 7;
}

#new-thought-form .color-dot:hover::before,
#new-thought-form .color-dot:hover::after,
#new-thought-form .color-radio:focus-visible + .color-dot::before,
#new-thought-form .color-radio:focus-visible + .color-dot::after,
#edit-thought-form .color-dot:hover::before,
#edit-thought-form .color-dot:hover::after,
#edit-thought-form .color-radio:focus-visible + .color-dot::before,
#edit-thought-form .color-radio:focus-visible + .color-dot::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.color-radio:checked + .color-dot {
  box-shadow: 0 0 0 2px #fffdf6, 0 0 0 4px var(--line);
}

.color-radio:focus-visible + .color-dot {
  box-shadow: 0 0 0 2px #fffdf6, 0 0 0 4px var(--line);
}

.modal-x {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.modal-x:hover {
  background: #f4f4f4;
}

.thought-source-link {
  position: absolute;
  top: 0.85rem;
  right: 3rem;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(30, 29, 28, 0.46);
  text-decoration: underline;
  text-decoration-color: rgba(30, 29, 28, 0.24);
  text-underline-offset: 0.13em;
  cursor: pointer;
}

.thought-source-link:hover {
  color: rgba(30, 29, 28, 0.66);
  text-decoration-color: rgba(30, 29, 28, 0.38);
}

.thought-source-link:focus-visible {
  outline: none;
  color: rgba(30, 29, 28, 0.72);
  text-decoration-color: rgba(30, 29, 28, 0.46);
}

.source-details-modal {
  width: min(95vw, 560px);
}

.source-details-modal-card {
  gap: 0.8rem;
  max-height: min(86vh, 720px);
  overflow: auto;
}

.source-details-content {
  display: grid;
  gap: 0.72rem;
}

.source-detail-stack {
  display: grid;
  gap: 0.58rem;
}

.source-detail-item {
  display: grid;
  gap: 0.2rem;
}

.source-detail-label {
  margin: 0;
  color: #6b655c;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.source-detail-value {
  margin: 0;
  color: #1f1d1b;
  font-size: 0.92rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.source-detail-value a {
  color: #1758c8;
  text-decoration: none;
  font-weight: 600;
}

.source-detail-value a:hover,
.source-detail-value a:focus-visible {
  text-decoration: underline;
}

.source-detail-placeholder {
  color: #8a8379;
}

.source-detail-panel {
  display: grid;
  gap: 0.45rem;
}

.source-detail-body {
  margin: 0;
  border: 1.4px solid #d8cfbe;
  border-radius: 0.74rem;
  background: #fbf8ef;
  padding: 0.62rem 0.7rem;
  color: #27231d;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.source-detail-body.is-scrollable {
  max-height: 14rem;
  overflow-y: auto;
}

.source-detail-toggle {
  align-self: flex-start;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1758c8;
  cursor: pointer;
}

.source-detail-toggle:hover,
.source-detail-toggle:focus-visible {
  text-decoration: underline;
}

.source-detail-notes {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.36rem;
  color: #756f66;
  font-size: 0.84rem;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}


.modal-actions-split {
  justify-content: space-between;
  align-items: center;
  gap: 0;
}

.delete-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #1e1d1c;
  color: #fffdf6;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  user-select: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 140ms ease;
}

.delete-text-btn:hover {
  background: #333130;
  transform: translateY(-1px);
}

.delete-text-btn:focus-visible {
  outline: 1.5px solid #6f6a61;
  outline-offset: 2px;
  border-radius: 999px;
}

.delete-modal .modal-card {
  width: 100%;
  gap: 0.6rem;
}

.delete-modal {
  position: fixed;
  width: min(90vw, 320px);
  background: transparent;
  border: none;
  padding: 0;
}

.delete-modal .modal-actions {
  justify-content: center;
}

.delete-modal .modal-actions button,
.cancel-finish-btn {
  border: 1.6px solid var(--line);
  color: var(--line);
  background: #fff;
}

.delete-modal .modal-actions button:hover,
.cancel-finish-btn:hover {
  background: #f4f4f4;
  cursor: pointer;
}

.finish-countdown-copy {
  font-size: 0.83rem;
}

.finish-progress {
  width: 100%;
  height: 0.46rem;
  border: 1.2px solid var(--line);
  border-radius: 999px;
  background: #f4f3ef;
  overflow: hidden;
}

.finish-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: #1e1d1c;
}

.filter-modal {
  width: min(92vw, 460px);
}

.filter-modal-card {
  gap: 0.8rem;
}

.filter-controls {
  display: flex;
  gap: 0.45rem;
}

.filter-text-btn {
  border: 1.4px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.26rem 0.62rem;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.filter-text-btn:hover {
  background: #f4f4f4;
}

.filter-color-rows {
  display: grid;
  gap: 0.5rem;
}

.filter-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.filter-row-check {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.filter-row-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 1.4px solid var(--line);
  background: var(--row-color);
}

.filter-row-name-text {
  color: #1e1d1c;
  font-size: 0.92rem;
  line-height: 1.15;
}

.filter-row-only {
  border: 1.4px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.18rem 0.58rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.filter-row-only:hover {
  background: #f4f4f4;
}

.filter-settings-link {
  border: none;
  background: transparent;
  color: #8c877d;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  text-align: left;
  padding: 0.08rem 0;
  cursor: pointer;
}

.filter-settings-link:hover {
  color: #6f6a61;
}

.filter-settings-link:focus-visible {
  outline: 1px solid #8f8a82;
  outline-offset: 2px;
  border-radius: 2px;
}

.archives-modal {
  width: min(94vw, 760px);
}

.archives-modal-card {
  gap: 0.72rem;
  max-height: min(86vh, 760px);
  overflow: auto;
}

.archives-subtitle {
  margin-top: -0.22rem;
  color: #7a746b;
  font-size: 0.84rem;
}

.archives-status {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.82rem;
  color: #6f6a61;
}

.archives-status.error {
  color: #8b2f2f;
}

.archives-list {
  display: grid;
  gap: 0.52rem;
}

.search-modal {
  width: min(94vw, 760px);
}

.search-modal-card {
  gap: 0.64rem;
  max-height: min(86vh, 760px);
  overflow: auto;
}

.search-input-wrap {
  display: grid;
  gap: 0.34rem;
  font-size: 0.84rem;
  color: #6f6a61;
}

.search-input-wrap input {
  color: #1e1d1c;
}

.search-results {
  display: grid;
  gap: 0.52rem;
}

.search-empty {
  border: 1.4px dashed #c8c0b2;
  border-radius: 0.7rem;
  background: #faf8f2;
  color: #8a847b;
  margin: 0;
  padding: 0.8rem 0.84rem;
  font-size: 0.84rem;
}

.search-item-actions {
  display: flex;
  justify-content: flex-end;
}

.search-hit-flash {
  position: relative;
  z-index: 8;
  transition: none;
  will-change: box-shadow, background-color;
  animation: searchHitFlash 2450ms cubic-bezier(0.22, 0.8, 0.22, 1) 1;
}

.search-hit-flash::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(30, 121, 91, 0.26);
  pointer-events: none;
  opacity: 0;
  transform: scale(1);
  will-change: transform, opacity;
  animation: searchHitRing 2450ms cubic-bezier(0.22, 0.8, 0.22, 1) 1;
}

@keyframes searchHitFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 121, 91, 0.08);
    background: rgba(30, 121, 91, 0.03);
  }
  36% {
    box-shadow: 0 0 0 6px rgba(30, 121, 91, 0.11);
    background: rgba(30, 121, 91, 0.085);
  }
  68% {
    box-shadow: 0 0 0 3px rgba(30, 121, 91, 0.07);
    background: rgba(30, 121, 91, 0.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(30, 121, 91, 0);
    background: transparent;
  }
}

@keyframes searchHitRing {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  26% {
    opacity: 0.46;
    transform: scale(1.012);
  }
  72% {
    opacity: 0.24;
    transform: scale(1.052);
  }
  100% {
    opacity: 0;
    transform: scale(1.085);
  }
}

.system-capture-modal {
  width: min(95vw, 620px);
}

.system-capture-modal-card {
  gap: 0.76rem;
  max-height: min(86vh, 700px);
  overflow: auto;
}

.system-capture-modal-body {
  margin-top: -0.16rem;
  color: #666056 !important;
  font-size: 0.9rem;
  line-height: 1.34;
}

.system-capture-modal-methods {
  display: grid;
  gap: 0.52rem;
}

.system-capture-method {
  border: 1.6px solid #d8cfbe;
  border-radius: 0.74rem;
  background: #fbf8ef;
  padding: 0.58rem 0.66rem;
  display: grid;
  gap: 0.3rem;
}

.system-capture-method h4 {
  margin: 0;
  color: #1d1a17;
  font-size: 0.94rem;
  line-height: 1;
}

.system-capture-method p {
  margin: 0;
  color: #4c473f !important;
  font-size: 0.86rem;
  line-height: 1.34;
}

.system-capture-method a {
  color: #1758c8;
  text-decoration: none;
  font-weight: 700;
}

.system-capture-method a:hover {
  text-decoration: underline;
}

.system-capture-modal-email {
  margin: 0 !important;
  color: #2d56f3 !important;
  font-size: clamp(1.12rem, 2.1vw, 1.38rem);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  width: 100%;
  padding: 0.62rem 0.74rem;
  border: 2px solid #a7b9ff;
  border-radius: 0.64rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 3px 10px rgba(45, 86, 243, 0.13);
}

.system-capture-modal-email.settings-capture-email-loading {
  font-size: 0.95rem !important;
  text-align: center;
  letter-spacing: 0;
  color: #7d776f !important;
  font-weight: 600;
}

.system-capture-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.archives-empty {
  border: 1.4px dashed #c8c0b2;
  border-radius: 0.7rem;
  background: #faf8f2;
  color: #8a847b;
  font-size: 0.88rem;
  padding: 0.58rem 0.7rem;
}

.archive-item {
  border: 1.4px solid #d4ccbe;
  border-radius: 0.74rem;
  background: #fbfaf6;
  padding: 0.56rem 0.64rem;
  display: grid;
  gap: 0.38rem;
}

.archive-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
}

.archive-item-subject {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.2;
  color: #1e1d1c;
}

.archive-item-lane {
  border: 1.3px solid #d2cbc0;
  border-radius: 999px;
  background: #fff;
  color: #6f6a61;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.44rem;
  white-space: nowrap;
}

.archive-item-description {
  margin: 0;
  color: #6f6a61;
  font-size: 0.84rem;
  line-height: 1.35;
}

.archive-item-meta {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.archive-category-tag {
  --archive-category-color: #1e1d1c;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 1.3px solid color-mix(in srgb, var(--archive-category-color) 42%, #b9b2a6);
  border-radius: 999px;
  background: color-mix(in srgb, var(--archive-category-color) 12%, #fff);
  color: #1e1d1c;
  font-size: 0.74rem;
  line-height: 1;
  padding: 0.16rem 0.48rem 0.16rem 0.34rem;
}

.archive-category-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--archive-category-color) 70%, #1e1d1c);
  background: var(--archive-category-color);
}

.archive-item-date {
  color: #9a9489;
  font-size: 0.72rem;
}

.archive-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.38rem;
}

.archive-action {
  border: 1.4px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1e1d1c;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.24rem 0.54rem;
  cursor: pointer;
}

.archive-action:hover {
  background: #f4f4f4;
}

.archive-action-danger {
  border-color: #bfa8a8;
  color: #7c2f2f;
  background: #fff9f9;
}

.archive-action[disabled] {
  opacity: 0.56;
  cursor: default;
}

.settings-modal {
  width: min(94vw, 1020px);
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
}

.settings-card {
  max-height: none;
  padding: 1rem;
  overflow: visible;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 0.95rem;
  min-height: min(72vh, 560px);
}

.settings-divider {
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(178, 169, 154, 0.52) 16%,
    rgba(178, 169, 154, 0.74) 50%,
    rgba(178, 169, 154, 0.52) 84%,
    transparent 100%
  );
}

.settings-left {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.45rem;
  min-width: 0;
  min-height: 0;
}

.settings-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.76rem;
  min-width: 0;
}

.settings-left h4,
.settings-right h4 {
  margin: 0;
  font-size: 1.03rem;
}

.settings-left p,
.settings-right p {
  margin: 0;
  color: #6f6a61;
  font-size: 0.86rem;
}

.settings-category-rows {
  display: grid;
  align-content: start;
  gap: 0.46rem;
  padding-top: 0.1rem;
  min-height: 0;
  overflow: visible;
  padding-right: 0.2rem;
}

.settings-category-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.52rem;
}

.settings-category-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--settings-color);
}

.settings-category-name {
  width: 100%;
  border: 1px solid #252525;
  border-radius: 0.45rem;
  padding: 0.38rem 0.56rem;
  font: inherit;
}

.settings-default-tag {
  color: #6f6a61;
  font-size: 0.76rem;
  white-space: nowrap;
}

.settings-category-row-actions {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-top: -0.06rem;
}

.modal-card .settings-row-color-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border: 1.4px solid #cbc2b3;
  border-radius: 999px;
  background: #faf8f2;
  color: #666157;
  font-weight: 500;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.16rem 0.4rem;
}

.settings-row-color-input {
  width: 1.65rem;
  height: 1.1rem;
  padding: 0;
  border: 1px solid #bfb6a7;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.settings-row-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings-row-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.settings-row-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.settings-row-action {
  border: 1.4px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1e1d1c;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.26rem 0.52rem;
  cursor: pointer;
}

.settings-row-action:hover {
  background: #f4f4f4;
}

.settings-row-action:disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

.settings-row-action-muted {
  border-color: #cbc2b3;
  color: #666157;
  background: #faf8f2;
}

.settings-row-action-reorder {
  min-width: 1.9rem;
  text-align: center;
  padding-left: 0.38rem;
  padding-right: 0.38rem;
}

.settings-row-action-delete {
  color: #7c2f2f;
  border-color: #bfa8a8;
  background: #fff9f9;
}

.settings-shared-section {
  margin-top: 0.56rem;
  border-top: 1px dashed #c8c0b2;
  padding-top: 0.56rem;
  display: grid;
  gap: 0.46rem;
}

.settings-shared-title {
  margin: 0;
  font-size: 0.8rem;
  color: #58534a;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.settings-shared-list {
  display: grid;
  gap: 0.42rem;
}

.settings-shared-row {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  flex-wrap: wrap;
}

.settings-shared-name {
  font-size: 0.94rem;
  color: #2a2a29;
}

.settings-shared-pill {
  margin-left: auto;
  border: 1.4px solid #92a9ba;
  border-radius: 999px;
  color: #3f6278;
  background: #eef6fd;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.17rem 0.44rem;
}

.settings-shared-row .settings-row-action {
  margin-left: 0.34rem;
}

.bubble-system-alert {
  border-style: dashed;
  border-width: 2px;
  border-color: #2f556a;
  background: #eaf5ff;
  color: #173445;
  font-weight: 600;
}

.settings-add-category-btn {
  justify-self: start;
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1e1d1c;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.1;
  padding: 0.4rem 0.78rem;
  cursor: pointer;
}

.settings-add-category-btn:hover {
  background: #f4f4f4;
}

.add-category-modal {
  width: min(92vw, 460px);
}

.add-category-card {
  max-width: 420px;
  display: grid;
  gap: 0.6rem;
}

.add-category-card label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.86rem;
  color: #6f6a61;
}

.add-category-card input[type="text"] {
  width: 100%;
  border: 1px solid #252525;
  border-radius: 0.45rem;
  padding: 0.36rem 0.52rem;
  font: inherit;
  color: #1e1d1c;
  background: #fff;
}

.add-category-card input[type="color"] {
  width: 8.2rem;
  height: 2rem;
  border: 1px solid #252525;
  border-radius: 0.45rem;
  padding: 0.16rem;
  background: #fff;
  cursor: pointer;
}

#add-settings-category:disabled {
  opacity: 0.55;
  cursor: default;
}

.add-category-card select {
  width: 100%;
  border: 1px solid #252525;
  border-radius: 0.45rem;
  padding: 0.36rem 0.52rem;
  font: inherit;
  color: #1e1d1c;
  background: #fff;
}

.settings-category-warning {
  margin: 0;
  color: #3e3a34;
  font-size: 0.9rem;
  line-height: 1.45;
}

.settings-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.18rem;
}

.settings-actions button {
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.4rem 0.78rem;
  cursor: pointer;
  font: inherit;
}

.settings-actions button:hover {
  background: #f4f4f4;
}

.settings-category-status {
  margin: 0;
  min-height: 1.2em;
  color: #6f6a61;
  font-size: 0.82rem;
}

.settings-category-status.error {
  color: #8b2f2f;
}

.settings-account,
.settings-lab-action {
  border: 1.5px solid #d4ccbe;
  border-radius: 0.76rem;
  background: #f9f6ee;
  padding: 0.66rem;
  display: grid;
  align-content: start;
  gap: 0.36rem;
}

.settings-account-value {
  color: #1e1d1c !important;
  font-size: 0.94rem !important;
}

.settings-signin-guide {
  margin-top: 0.28rem;
  display: grid;
  gap: 0.52rem;
}

.settings-password-panel {
  display: grid;
  gap: 0.52rem;
  padding: 0.7rem 0.76rem;
  border: 1.5px solid #d6cebf;
  border-radius: 0.72rem;
  background: #fffdf7;
}

.settings-password-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.72rem;
}

.settings-password-note {
  margin: 0;
  color: #6f6a61;
  font-size: 0.82rem;
  line-height: 1.4;
}

.settings-capture-guide {
  margin-top: 0.3rem;
  padding: 0.82rem 0.88rem;
  border: 2px solid #d4c6aa;
  border-radius: 0.78rem;
  background: linear-gradient(160deg, #fffcf5 0%, #f4faf6 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 20px rgba(38, 32, 23, 0.08);
  display: grid;
  gap: 0.56rem;
}

.settings-capture-title {
  margin: 0 !important;
  color: #1f1b15 !important;
  font-size: 0.97rem !important;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.settings-capture-copy {
  margin: 0 !important;
  color: #4f493f !important;
  font-size: 0.9rem !important;
  line-height: 1.42;
}

.settings-capture-link {
  color: #155c4b;
  text-decoration: none;
}

.settings-capture-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  justify-self: start;
  padding: 0.44rem 0.84rem;
  border-radius: 999px;
  border: 1.8px solid #1a6a57;
  background: #eaf8f2;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.settings-capture-call:hover {
  background: #ddf2e9;
}

.settings-capture-call:focus-visible {
  outline: 2px solid #2b86ff;
  outline-offset: 2px;
}

.settings-capture-email {
  margin: 0 !important;
  color: #2d56f3 !important;
  font-size: clamp(0.98rem, 1.2vw, 1.14rem) !important;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.004em;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  width: 100%;
  padding: 0.78rem 0.86rem;
  border: 2.2px solid #9fb5ff;
  border-radius: 0.76rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 4px 14px rgba(45, 86, 243, 0.16);
}

.settings-capture-email-loading {
  font-size: 1.08rem !important;
  text-align: center;
  letter-spacing: 0;
  color: #7d776f !important;
  font-weight: 600;
}

.settings-capture-email-ready {
  color: #2d56f3 !important;
}

.settings-capture-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.settings-capture-copy-email-btn {
  border: 1.8px solid #2d56f3;
  border-radius: 999px;
  background: #2d56f3;
  color: #fff;
  font-size: 0.89rem;
  font-weight: 700;
  padding: 0.36rem 0.78rem;
  cursor: pointer;
}

.settings-capture-copy-email-btn:hover {
  background: #2448ce;
  border-color: #2448ce;
}

.settings-capture-copy-email-btn:disabled {
  background: #9eaecf;
  border-color: #9eaecf;
  cursor: default;
}

.settings-capture-copy-email-btn:focus-visible {
  outline: 2px solid #2b86ff;
  outline-offset: 2px;
}

.settings-capture-copy-status {
  min-height: 1.1rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #4c7288;
}

.settings-capture-copy-status.error {
  color: #8d312c;
}

.settings-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 0.24rem;
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1e1d1c;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none;
  padding: 0.38rem 0.72rem;
}

.settings-contact-link:hover {
  background: #f4f4f4;
}

.settings-contact-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.free-mind-btn {
  position: relative;
  margin-top: 0.2rem;
  width: 100%;
  border: 1.8px solid #0e1113;
  border-radius: 1rem;
  background: radial-gradient(circle at 16% 24%, #2a3a47 0%, #151d23 40%, #0e1012 100%);
  color: #ebf5f3;
  padding: 0.62rem 0.68rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  cursor: default;
  overflow: hidden;
}

.free-mind-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    120deg,
    transparent 0 8px,
    rgba(141, 221, 193, 0.06) 8px 10px
  );
  pointer-events: none;
}

.free-mind-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(112, 248, 194, 0.2), transparent 42%);
  pointer-events: none;
}

.free-mind-icon {
  position: relative;
  width: 2.12rem;
  height: 2.12rem;
  border-radius: 999px;
  border: 1.5px solid rgba(152, 248, 211, 0.86);
  background: #0c1214;
  box-shadow: 0 0 0 1px rgba(94, 154, 133, 0.5) inset;
  display: block;
  flex-shrink: 0;
}

.free-mind-icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.free-mind-icon span:nth-child(1) {
  width: 0.96rem;
  height: 1px;
  background: rgba(152, 248, 211, 0.92);
}

.free-mind-icon span:nth-child(2) {
  width: 1px;
  height: 0.96rem;
  background: rgba(152, 248, 211, 0.92);
}

.free-mind-icon span:nth-child(3) {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(152, 248, 211, 0.95);
  background: transparent;
}

.free-mind-copy {
  display: grid;
  gap: 0.1rem;
}

.free-mind-copy strong {
  font-size: 1.02rem;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.free-mind-copy small {
  font-size: 0.69rem;
  color: #9bd8c1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.neural-map-modal {
  width: min(96vw, 1100px);
}

.neural-map-card {
  position: relative;
  display: grid;
  gap: 0.72rem;
  max-height: 90vh;
  overflow: auto;
  padding: 1rem;
  background: linear-gradient(170deg, #fffef9 0%, #f8f6ee 100%);
}

.neural-map-subtitle {
  margin-top: -0.2rem;
  color: #5a554b;
  font-size: 0.9rem;
}

.neural-map-toolbar {
  display: flex;
  justify-content: flex-end;
}

.neural-map-toolbar button {
  border: 1.6px solid #111;
  border-radius: 999px;
  background: #111;
  color: #f8f8f8;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.36rem 0.72rem;
  cursor: pointer;
}

.neural-map-toolbar button:hover {
  background: #232323;
}

.neural-map-visual-shell {
  position: relative;
  height: clamp(260px, 42vh, 430px);
  border: 1.6px solid #262626;
  border-radius: 0.95rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(74, 123, 234, 0.2), transparent 34%),
    radial-gradient(circle at 80% 16%, rgba(75, 163, 106, 0.2), transparent 32%),
    radial-gradient(circle at 50% 85%, rgba(190, 107, 155, 0.16), transparent 34%),
    linear-gradient(160deg, #171717 0%, #21262b 45%, #13151a 100%);
}

.neural-map-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.neural-link {
  stroke: rgba(232, 246, 255, 0.25);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.neural-link-lane {
  stroke: rgba(166, 220, 255, 0.44);
  stroke-width: 1.7;
}

.neural-link-thought {
  stroke-width: 1.35;
}

.neural-link-theme {
  stroke: rgba(239, 250, 215, 0.45);
}

.neural-link-theme-thought {
  stroke: rgba(235, 242, 255, 0.3);
  stroke-dasharray: 2 4;
}

.neural-map-visual {
  position: relative;
  width: 100%;
  height: 100%;
}

.neural-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1.3px solid rgba(255, 255, 255, 0.8);
  background: rgba(11, 11, 13, 0.75);
  color: #f7f8fb;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  text-align: center;
  max-width: min(34vw, 230px);
  overflow: hidden;
  text-overflow: ellipsis;
  animation: neuralNodeDrift var(--drift-duration, 5.4s) ease-in-out var(--drift-delay, 0s) infinite;
}

.neural-node-core {
  border-width: 1.8px;
  background: rgba(250, 250, 250, 0.95);
  color: #111;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.82rem;
}

.neural-node-lane {
  border-color: rgba(152, 225, 255, 0.85);
  background: rgba(26, 33, 41, 0.92);
  color: #f0f6ff;
  font-weight: 600;
}

.neural-node-thought {
  border-width: 1.5px;
  border-color: var(--node-color, #8aa4ff);
  background: rgba(20, 21, 24, 0.93);
}

.neural-node-theme {
  border-color: rgba(228, 247, 173, 0.8);
  background: rgba(26, 28, 21, 0.9);
  color: #f1f8d8;
  font-size: 0.68rem;
}

.neural-node-extra {
  border-color: rgba(238, 238, 238, 0.72);
  background: rgba(38, 38, 38, 0.82);
  color: #f5f5f5;
  padding: 0.24rem 0.5rem;
  font-size: 0.66rem;
}

.neural-map-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.neural-map-panel {
  border: 1.4px solid #d7d1c4;
  border-radius: 0.8rem;
  background: #fbf9f2;
  padding: 0.58rem 0.64rem;
}

.neural-map-panel h4 {
  margin: 0 0 0.34rem;
  font-size: 0.92rem;
}

.neural-map-list {
  margin: 0;
  padding-left: 1.06rem;
  display: grid;
  gap: 0.38rem;
  color: #2b2720;
  font-size: 0.82rem;
  line-height: 1.28;
}

.neural-map-story {
  margin: 0;
  border: 1.4px solid #d7d1c4;
  border-radius: 0.74rem;
  background: #f8f5ec;
  color: #302c24;
  padding: 0.56rem 0.66rem;
  font-size: 0.84rem;
  line-height: 1.35;
}

@keyframes neuralNodeDrift {
  0%,
  100% {
    transform: translate(-50%, -50%) translate3d(0, 0, 0);
  }
  50% {
    transform: translate(-50%, -50%) translate3d(0, -2px, 0);
  }
}

.modal-actions button,
.modal-close {
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.4rem 0.78rem;
  cursor: pointer;
  font: inherit;
}

.footer-modal {
  width: min(92vw, 520px);
}

.footer-modal-card {
  gap: 0.78rem;
}

.footer-modal-card textarea {
  min-height: 6.4rem;
}

.footer-form-help {
  margin-top: -0.15rem;
  color: #8c877d;
  font-size: 0.8rem;
}

.footer-form-status {
  margin: 0;
  min-height: 1rem;
  color: #8c877d;
  font-size: 0.78rem;
  line-height: 1.2;
}

.footer-form-status.error {
  color: #8c2e2e;
}

@media (max-width: 900px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
  }

  .active-filter-chips {
    max-width: 100%;
    justify-content: flex-start;
  }

  .filter-word {
    margin-right: 10px;
    margin-bottom: 0;
  }

  .settings-dots {
    margin-right: 0;
    margin-bottom: 0;
  }

  .settings-modal {
    width: min(96vw, 560px);
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
  }

  .settings-card {
    max-height: none;
    overflow: visible;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .settings-divider {
    display: none;
  }

  .settings-right {
    grid-template-rows: none;
  }

  .settings-capture-guide {
    padding: 0.64rem 0.66rem;
  }

  .settings-password-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-capture-call {
    font-size: 0.98rem;
    padding: 0.38rem 0.72rem;
  }

  .settings-bubble-fill-row {
    gap: 0.46rem;
  }

  .settings-bubble-fill-value {
    min-width: 2.8rem;
    font-size: 0.8rem;
  }

  .settings-capture-email {
    font-size: clamp(0.93rem, 3.05vw, 1.03rem) !important;
    padding: 0.62rem 0.54rem;
  }

  .settings-capture-copy-email-btn {
    width: 100%;
    max-width: 240px;
  }

  .system-inbox-card {
    padding: 0.66rem;
  }

  .system-inbox-card-dismiss {
    top: 0.34rem;
    right: 0.34rem;
    width: 1.78rem;
    height: 1.78rem;
  }

  .system-capture-modal {
    width: min(96vw, 560px);
  }

  .system-capture-modal-email {
    font-size: clamp(1rem, 4.6vw, 1.26rem);
    padding: 0.56rem 0.58rem;
  }

  .add-category-card input[type="color"] {
    width: 100%;
  }

  .settings-category-row {
    grid-template-columns: auto 1fr;
  }

  .settings-default-tag {
    grid-column: 2;
  }

  .settings-category-row-actions {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .neural-map-panels {
    grid-template-columns: 1fr;
  }

  .neural-node {
    max-width: min(46vw, 210px);
  }

  .app-footer {
    margin-top: 1.15rem;
    justify-content: center;
  }

  .app-footer-nav {
    gap: 0.55rem;
  }

  .welcome-layout {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .capture-card {
    width: min(94vw, 720px);
    margin-top: 0.95rem;
  }

  .capture-overlay {
    padding: 1rem 1rem 1.1rem;
  }

  .capture-main {
    width: min(100%, 30rem);
    grid-template-rows: auto auto 4.4rem 3.1rem 1rem;
  }

  .capture-prompt-title {
    font-size: clamp(1.22rem, 5.2vw, 1.55rem);
    line-height: 1.08;
    max-width: none;
    white-space: normal;
  }

  .capture-form {
    width: min(100%, 18.5rem);
    min-height: 2.8rem;
  }

  .capture-form input {
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
  }

  .capture-add,
  .capture-start {
    font-size: 0.88rem;
  }

  .capture-start {
    padding: 0.78rem 0.96rem;
  }

  .mini-sweeper-board {
    height: 6.8rem;
  }

  .board {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .lane {
    border-right: none;
    border-bottom: 2px solid var(--line);
    min-height: 10rem;
  }

  .lane:last-child {
    border-bottom: none;
  }

  .inbox-top {
    border-bottom: 2px solid var(--line);
  }
}
