:root {
  color-scheme: light;
  --sidebar-width: 248px;
  --bg: #eef2ef;
  --surface: #ffffff;
  --surface-2: #fafbf7;
  --surface-3: #f0f2ed;
  --surface-panel: rgba(251, 251, 247, 0.9);
  --surface-overlay: rgba(255, 255, 255, 0.97);
  --topbar-bg: rgba(255, 255, 255, 0.66);
  --grid-bg: #e7ece7;
  --grid-line: rgba(24, 25, 22, 0.035);
  --grid-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0) 38%);
  --hover-tint: rgba(24, 25, 22, 0.04);
  --inverse-bg: #151613;
  --inverse-fg: #fffdf4;
  --ink: #181916;
  --muted: #77786f;
  --line: rgba(24, 25, 22, 0.12);
  --line-strong: rgba(24, 25, 22, 0.22);
  --forest: #315b37;
  --green: #2cbc6a;
  --blue: #2f80ff;
  --coral: #ef6f55;
  --violet: #7a57ff;
  --yellow: #ffe16d;
  --shadow: 0 22px 70px rgba(31, 35, 29, 0.17);
  --soft-shadow: 0 12px 32px rgba(31, 35, 29, 0.11);
  --card-width: 900px;
  --card-height: 560px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1311;
  --surface: #1c2421;
  --surface-2: #232c28;
  --surface-3: #2c352f;
  --surface-panel: rgba(22, 28, 25, 0.88);
  --surface-overlay: rgba(28, 36, 33, 0.97);
  --topbar-bg: rgba(22, 28, 25, 0.7);
  --grid-bg: #131a17;
  --grid-line: rgba(255, 255, 255, 0.04);
  --grid-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 38%);
  --hover-tint: rgba(255, 255, 255, 0.05);
  --inverse-bg: #ebede5;
  --inverse-fg: #0e1311;
  --ink: #ebede5;
  --muted: #8a9088;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.22);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  --soft-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 280px;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  transition: grid-template-columns 220ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 280px;
}

.app-shell.inspector-collapsed {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0;
}

.app-shell.sidebar-collapsed.inspector-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.app-shell.inspector-collapsed .inspector {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

.inspector {
  transition: opacity 180ms ease, transform 220ms ease;
}

.rail-toggle.is-active {
  background: color-mix(in srgb, var(--accent, #7a57ff) 18%, transparent);
  color: color-mix(in srgb, var(--accent, #7a57ff) 80%, var(--ink));
  border-color: color-mix(in srgb, var(--accent, #7a57ff) 35%, transparent);
}

.inspector.is-ai {
  padding: 0;
}

.ai-buddy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 20px;
  height: 100%;
  position: relative;
}

.ai-buddy-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-buddy-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #7a57ff) 80%, white) 0%, var(--accent, #7a57ff) 100%);
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent, #7a57ff) 35%, transparent);
}

.ai-buddy-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 850;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.ai-buddy .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
}

.ai-buddy-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 240px;
}

.ai-buddy-stub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  width: fit-content;
}

.ai-buddy-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #7a57ff) 70%, var(--ink));
  opacity: 0.4;
  animation: ai-buddy-pulse 1400ms infinite ease-in-out;
}

.ai-buddy-dot:nth-child(2) { animation-delay: 200ms; }
.ai-buddy-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes ai-buddy-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.sidebar,
.inspector {
  position: relative;
  z-index: 5;
  border-color: var(--line);
  background: var(--surface-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: var(--sidebar-width);
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.sidebar-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sidebar-search-wrap:focus-within {
  border-color: color-mix(in srgb, var(--accent, #7a57ff) 60%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7a57ff) 18%, transparent);
  color: var(--ink);
}

.sidebar-search {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
}

.sidebar-search::placeholder {
  color: var(--muted);
}

.sidebar-task-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
}

.sidebar-empty {
  margin: 6px 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-task {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 10px 10px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease;
}

.sidebar-task:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.sidebar-task.is-selected {
  background: color-mix(in srgb, var(--master-color, var(--accent, #7a57ff)) 16%, transparent);
}

.sidebar-task-accent {
  flex: 0 0 4px;
  border-radius: 999px;
  background: var(--master-color, var(--accent, #7a57ff));
  align-self: stretch;
}

.sidebar-task-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sidebar-task-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-task-product {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-folder {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-folder:hover {
  color: var(--ink);
}

.sidebar-folder-chevron {
  display: inline-flex;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: rotate(-90deg);
}

.sidebar-folder.is-open .sidebar-folder-chevron {
  transform: rotate(0);
}

.sidebar-folder-label {
  flex: 1;
}

.sidebar-folder-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-month {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.sidebar-month-label {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-shell.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  box-shadow: var(--soft-shadow);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.brand-block h1,
.board-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.05;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
}

.command-icon {
  margin-left: auto;
  opacity: 0.55;
}

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

.board-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.board-link.active {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-panel {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel-title,
.inspector-top,
.presence,
.board-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-action {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--line);
}

.team-strip {
  display: flex;
  align-items: center;
}

.team-strip span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-right: -8px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.team-strip span:nth-child(2) {
  background: var(--coral);
}

.team-strip span:nth-child(3) {
  background: var(--green);
}

.team-strip span:nth-child(4) {
  background: var(--violet);
}

.workspace {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  min-width: 0;
}

.topbar {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--topbar-bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.board-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-badge {
  height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.board-badge svg {
  opacity: 0.7;
}

.board-badge:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}

.board-picker-wrap {
  position: relative;
}

.board-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: menu-bounce-in 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.board-picker-label {
  margin: 6px 8px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.board-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.board-picker-item:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.board-picker-item.is-active {
  background: color-mix(in srgb, var(--accent, #7a57ff) 14%, transparent);
  color: var(--ink);
}

.board-picker-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.board-picker-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-picker-item-shared {
  display: inline-flex;
  color: color-mix(in srgb, var(--accent, #7a57ff) 80%, var(--ink));
}

.board-picker-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

.board-picker-item.is-new {
  color: var(--muted);
}

.board-picker-item.is-new:hover {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.presence {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(44, 188, 106, 0.22);
  border-radius: 7px;
  background: rgba(44, 188, 106, 0.08);
  color: #1b7a49;
  font-size: 12px;
  font-weight: 700;
}

.presence svg {
  opacity: 0.8;
}

.icon-button,
.sidebar-toggle,
.share-button,
.tool,
.zoom-controls button {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.icon-button,
.sidebar-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
}

.icon-button:hover,
.sidebar-toggle:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
}

.sidebar-toggle {
  flex: 0 0 30px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.share-button:hover {
  filter: brightness(1.05);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  transform: rotate(-10deg);
}

.theme-toggle.is-dark {
  background: color-mix(in srgb, var(--yellow) 18%, transparent);
  border-color: color-mix(in srgb, var(--yellow) 40%, transparent);
  color: var(--yellow);
}

.theme-toggle.is-dark:hover {
  transform: rotate(20deg);
}

.theme-toggle svg {
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.canvas-stage {
  position: relative;
  overflow: hidden;
  cursor: default;
  touch-action: none;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(70% 60% at 18% 22%, color-mix(in srgb, var(--violet) 16%, transparent) 0%, transparent 70%),
    radial-gradient(60% 50% at 82% 78%, color-mix(in srgb, var(--coral) 14%, transparent) 0%, transparent 70%),
    radial-gradient(55% 50% at 38% 78%, color-mix(in srgb, var(--green) 12%, transparent) 0%, transparent 70%),
    var(--grid-bg);
}

.canvas-stage.panning {
  cursor: grabbing;
}

body.is-pan-mode .canvas-stage,
body.is-pan-mode .canvas-world,
body.is-pan-mode .mission-card,
body.is-pan-mode .sticky-note {
  cursor: grab !important;
}

body.is-pan-mode .canvas-stage.panning {
  cursor: grabbing !important;
}

.canvas-grid {
  position: absolute;
  inset: 0;
  background: var(--grid-wash);
  pointer-events: none;
}

.canvas-world {
  position: absolute;
  inset: 0;
  width: 8000px;
  height: 6000px;
  transform-origin: 0 0;
  will-change: transform;
}

.marquee {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border: 2px solid color-mix(in srgb, #7a57ff 80%, transparent);
  background: color-mix(in srgb, #7a57ff 12%, transparent);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 150;
}

.done-pool-header {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 36px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 86%, black));
  color: #fff;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--green) 35%, transparent);
}

.done-pool-header h2 {
  margin: 0;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1;
}

.done-pool-header .done-pool-count {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.done-pool-bucket {
  position: absolute;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.done-pool-year {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 86%, black));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--green) 30%, transparent);
  transition: filter 160ms ease, transform 160ms ease;
}

.done-pool-year:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.done-pool-year-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.done-pool-year.is-collapsed .done-pool-year-chevron {
  transform: rotate(-90deg);
}

.done-pool-year-label {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.36em;
}

.done-pool-year-count {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.done-pool-bucket[data-alt="0"] {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.done-pool-bucket[data-alt="1"] {
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
}

.done-pool-month-tag {
  position: absolute;
  top: 22px;
  left: 22px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  z-index: 1;
}

.done-pool-watermark {
  position: absolute;
  top: 50%;
  right: 56px;
  transform: translateY(-50%);
  font-size: 240px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
}

.drop-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
  border: 3px dashed color-mix(in srgb, #7a57ff 70%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, #7a57ff 10%, transparent);
  transition: transform 270ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.board-frame {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: var(--soft-shadow);
}

.board-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 440px;
  padding: 64px 64px 64px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 2px solid var(--line);
}

.board-title {
  display: flex;
  align-items: flex-end;
  gap: 36px;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
}

.topbar,
.board-heading {
  user-select: none;
  -webkit-user-select: none;
}

.board-title-year {
  font-size: 280px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: -28px;
}

.board-title-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 28px;
  min-width: 0;
}

.board-title-eyebrow {
  font-size: 96px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 0.95;
}

.board-title-sub {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.board-options {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
  transition: background 160ms ease, transform 160ms ease;
}

.board-options svg {
  width: 28px;
  height: 28px;
}

.board-options:hover {
  background: var(--surface-3);
  transform: rotate(60deg);
}

.board-row {
  position: absolute;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
  transition: background 200ms ease;
}

.board-row:first-of-type {
  border-top: 0;
}

.board-row-label {
  position: relative;
  z-index: 26;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-shrink: 0;
  border-radius: 18px;
  margin: 22px 60px 22px 28px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 12%, transparent) 0%,
      transparent 36%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, oklch(from var(--row-accent) calc(l + 0.06) c h) 70%, var(--surface)) 0%,
      color-mix(in srgb, var(--row-accent) 60%, var(--surface)) 100%
    );
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.board-row-expand {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: background 180ms ease, opacity 180ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.board-row-expand:hover {
  background: rgba(255, 255, 255, 0.28);
  opacity: 1;
  transform: translateY(-50%) rotate(90deg) scale(1.06);
}

.board-row-expand svg {
  width: 56px;
  height: 56px;
  stroke-width: 2.2;
}

.board-row-label.is-product .board-row-expand {
  background: rgba(255, 255, 255, 0.1);
  color: var(--surface);
}

.board-row-label.is-product .board-row-expand:hover {
  background: rgba(255, 255, 255, 0.2);
}

.board-row-expand.is-open {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) rotate(-90deg);
}
.board-row-expand.is-open:hover {
  transform: translateY(-50%) rotate(-90deg) scale(1.06);
}

.row-detail-clip {
  position: absolute;
  top: 22px;
  bottom: 22px;
  /* Extend the clip all the way past the label's right edge so the glass
     material spans behind the entire master label. The label (z-index 26)
     sits on top of this glass; its rounded corners no longer reveal the dark
     canvas between the panel and itself. */
  right: calc(100% - 314px);
  width: 846px;
  overflow: hidden;
  z-index: 25;
  border-radius: 24px 0 0 24px;
  pointer-events: none;
}

.row-detail-clip > .row-detail-panel {
  pointer-events: auto;
}

.row-detail-panel {
  position: absolute;
  inset: 0;
  /* Right padding accounts for the 280px of panel hidden behind the label
     (846 wrapper width - 566 visible width = 280) plus the original 40px gutter. */
  padding: 36px 320px 36px 40px;
  border-radius: 24px 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--ink);
  background-image:
    linear-gradient(
      270deg,
      color-mix(in srgb, var(--row-accent) 55%, transparent) 0%,
      color-mix(in srgb, var(--row-accent) 22%, transparent) 28%,
      color-mix(in srgb, var(--row-accent) 6%, transparent) 60%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 78%, transparent) 0%,
      color-mix(in srgb, var(--surface) 88%, transparent) 100%
    );
  background-size: 566px 100%, 100% 100%;
  background-position: left top, 0 0;
  background-repeat: no-repeat;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 0 0 1px color-mix(in srgb, var(--row-accent) 22%, transparent) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 12px 28px -12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  animation: row-detail-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: right center;
  overflow: hidden;
}

.row-detail-panel.is-closing {
  animation: row-detail-out 280ms cubic-bezier(0.55, 0, 0.85, 0) both;
  pointer-events: none;
}

.row-detail-panel::after {
  display: none;
}

@keyframes row-detail-in {
  0% { clip-path: inset(0 0 0 100%); }
  100% { clip-path: inset(0 0 0 0); }
}

@keyframes row-detail-out {
  0%   { transform: translateX(0); }
  100% { transform: translateX(100%); }
}


.row-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.row-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.row-detail-stat strong {
  font-size: 72px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.row-detail-stat span {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.row-detail-bucket-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-detail-buckets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0 4px 4px 0;
  list-style: none;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.row-detail-buckets::-webkit-scrollbar {
  width: 8px;
}
.row-detail-buckets::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 999px;
}

.row-detail-bucket {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}

.row-detail-bucket-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.row-detail-bucket-name {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
}

.row-detail-bucket-count {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}

.board-row-name {
  line-height: 1;
}

.board-row-glyph {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  color: #fff;
  opacity: 0.3;
}

.board-row-glyph svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.4;
}

.board-row.is-drop-target {
  background: color-mix(in srgb, var(--accent, #7a57ff) 8%, transparent);
}

.board-row.is-drop-target .board-row-label {
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

/* Product row labels share the same colored glass material as the master rows
   — the colour now comes from each product's own `color` setting. */

.mission-card {
  transition:
    transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 200ms ease,
    border-color 160ms ease;
}

.mission-card.is-dragging {
  transition: none;
  z-index: 200;
}

@property --bounce-scale {
  syntax: "<number>";
  initial-value: 1;
  inherits: false;
}

@property --bounce-opacity {
  syntax: "<number>";
  initial-value: 1;
  inherits: false;
}

@property --accent {
  syntax: "<color>";
  initial-value: #7a57ff;
  inherits: true;
}

@keyframes drop-bounce {
  0% {
    --bounce-scale: 0.45;
    --bounce-opacity: 0;
  }
  55% {
    --bounce-scale: 1.1;
    --bounce-opacity: 1;
  }
  80% {
    --bounce-scale: 0.97;
  }
  100% {
    --bounce-scale: 1;
    --bounce-opacity: 1;
  }
}

.mission-card,
.sticky-note {
  opacity: var(--bounce-opacity, 1);
}

.mission-card.is-new,
.sticky-note.is-new {
  animation: drop-bounce 460ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sticky-note {
  --note-bg: #ffe16d;
  --note-shadow: 0 18px 36px rgba(202, 161, 27, 0.4);
  position: absolute;
  top: 0;
  left: 0;
  width: var(--note-w, 320px);
  height: var(--note-h, 300px);
  padding: 56px 28px 32px;
  border-radius: 6px;
  background: var(--note-bg);
  box-shadow: var(--note-shadow), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  color: #2a2406;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  will-change: transform;
  cursor: default;
  touch-action: none;
  user-select: none;
  transform-origin: top left;
  transition:
    box-shadow 220ms ease,
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sticky-tape {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-2.5deg);
  width: 160px;
  height: 40px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  cursor: grab;
  z-index: 2;
}

.sticky-tape::before,
.sticky-tape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
}

.sticky-tape::before {
  left: -4px;
}
.sticky-tape::after {
  right: -4px;
}

.sticky-note.is-dragging .sticky-tape {
  cursor: grabbing;
}

.sticky-note.is-dragging {
  transition: none;
  z-index: 200;
  cursor: grabbing;
}

.sticky-note.selected {
  box-shadow: 0 0 0 3px rgba(122, 87, 255, 0.35), var(--note-shadow);
}

.sticky-note-text {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  resize: none;
  overflow: auto;
  cursor: text;
  user-select: text;
}

.sticky-note-text::placeholder {
  color: rgba(42, 36, 6, 0.45);
}

.sticky-delete {
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1), background 160ms ease;
  z-index: 2;
}

.sticky-delete:hover {
  transform: scale(1.12);
}

.sticky-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 50%, rgba(42, 36, 6, 0.35) 50%, rgba(42, 36, 6, 0.35) 60%, transparent 60%, transparent 70%, rgba(42, 36, 6, 0.35) 70%, rgba(42, 36, 6, 0.35) 80%, transparent 80%);
}

[data-theme="dark"] .sticky-note {
  --note-bg: #f4c542;
  --note-shadow: 0 20px 38px rgba(0, 0, 0, 0.55);
  color: #1a1503;
}

[data-theme="dark"] .sticky-tape {
  background: rgba(255, 255, 255, 0.6);
}

.mission-card {
  --accent: #7a57ff;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--card-width);
  height: var(--card-height);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, color-mix(in srgb, var(--ink) 14%, transparent));
  border-radius: 24px;
  isolation: isolate;
  /* No background here — the body glass lives in ::before so the top bar
     can be a fully transparent tinted glass over the raw canvas. */
  background: transparent;
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 18%, transparent) inset,
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent) inset,
    0 30px 60px -22px rgba(0, 0, 0, 0.45),
    0 12px 24px -14px rgba(0, 0, 0, 0.3);
  touch-action: none;
  user-select: none;
  cursor: default;
  will-change: transform;
  contain: layout style;
  transition:
    transform 270ms cubic-bezier(0.34, 1.56, 0.64, 1),
    --accent 320ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.mission-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 23px;
  pointer-events: none;
  z-index: -1;
  /* Solid translucent body — backdrop-filter was too expensive when many
     cards are on screen. Now fills the entire card so the inset master
     band floats above it just like the home task card. */
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      color-mix(in srgb, var(--accent) 26%, var(--surface)) 0%,
      color-mix(in srgb, var(--accent) 8%, var(--surface)) 40%,
      var(--surface) 70%
    );
}

.mission-card:hover {
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent) inset,
    0 36px 70px -22px rgba(0, 0, 0, 0.55),
    0 16px 30px -14px rgba(0, 0, 0, 0.38);
}

.mission-card:has(.field-menu) {
  z-index: 100;
}

.mission-card.selected {
  border-color: var(--accent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 30%, transparent) inset,
    0 0 0 3px var(--accent) inset,
    0 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent),
    0 0 0 14px color-mix(in srgb, var(--accent) 18%, transparent),
    0 50px 90px -24px rgba(0, 0, 0, 0.7);
  transform: scale(1.02);
  z-index: 50;
}

.mission-card button {
  cursor: pointer;
}

.card-drag-handle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 78px;
  margin: 18px 18px 0;
  padding: 0 24px;
  border-radius: 16px;
  overflow: hidden;
  background:
    /* Subtle top sheen */
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 12%, transparent) 0%,
      transparent 36%,
      transparent 100%
    ),
    /* Solid tinted bar — no backdrop-filter; cheap to paint per card. */
    linear-gradient(
      180deg,
      color-mix(in srgb, oklch(from var(--accent) calc(l + 0.06) c h) 78%, var(--surface)) 0%,
      color-mix(in srgb, var(--accent) 70%, var(--surface)) 100%
    );
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 -1px 0 color-mix(in srgb, var(--accent) 24%, transparent) inset,
    0 10px 24px -10px color-mix(in srgb, var(--accent) 50%, transparent);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: grab;
  transition: filter 160ms ease, background 200ms ease;
}

.card-drag-handle-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
}

.card-drag-handle-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}

.card-drag-handle:hover {
  filter: brightness(1.04);
}

.card-drag-handle:active {
  cursor: grabbing;
}

.card-drag-handle .drag-grip {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms ease;
}

.card-drag-handle:hover .drag-grip {
  color: #fff;
}

.card-drag-handle-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-drag-handle-caret {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
}

.card-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 460px;
  align-items: center;
  gap: 18px;
  padding: 20px 28px 16px;
}

.product-symbol,
.mini-product {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  line-height: 1;
  text-transform: lowercase;
}

.product-symbol {
  width: 56px;
  height: 56px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, color-mix(in srgb, var(--ink) 10%, transparent));
  font-size: 32px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 10%, color-mix(in srgb, var(--surface) 80%, transparent)) 0%,
      color-mix(in srgb, var(--surface) 86%, transparent) 100%
    );
  box-shadow: 0 1px 0 color-mix(in srgb, #ffffff 14%, transparent) inset;
  transition: transform 160ms ease, background 160ms ease;
}

.product-symbol:hover {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 16%, color-mix(in srgb, var(--surface) 78%, transparent)) 0%,
      color-mix(in srgb, var(--surface) 84%, transparent) 100%
    );
  transform: translateY(-1px);
}

.product-symbol.blue,
.mini-product.blue {
  color: var(--blue);
}

.product-symbol.coral,
.mini-product.coral {
  color: var(--coral);
}

.product-symbol.violet,
.mini-product.violet {
  color: var(--violet);
}

.product-name {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.005em;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 160ms ease;
}

.product-name:hover {
  background: var(--hover-tint);
}

.mission-name {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 76px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  transition: background 160ms ease;
}

.mission-name::placeholder {
  color: var(--muted);
}

.mission-name:hover {
  background: var(--hover-tint);
}

.mission-name:focus {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}

.header-status-block {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  border-radius: 12px;
  background: #9a9d96;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 6px 18px color-mix(in srgb, currentColor 18%, transparent);
  transition: filter 160ms ease, transform 160ms ease;
}

.priority-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.priority-toggle:hover {
  color: #ef4d3d;
  background: color-mix(in srgb, #ef4d3d 14%, var(--surface-2));
  border-color: color-mix(in srgb, #ef4d3d 50%, var(--line));
  transform: translateY(-1px);
}

.priority-toggle.is-on {
  background: #ef4d3d;
  border-color: #ef4d3d;
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, #ef4d3d 35%, transparent);
}

.priority-toggle svg {
  stroke-width: 2.4;
}

.drag-grip-right {
  flex: 0 0 240px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0;
  margin-right: 0;
  color: rgba(0, 0, 0, 0.25);
  cursor: grab;
  transition: color 160ms ease;
}

.drag-grip-right:hover {
  color: rgba(0, 0, 0, 0.55);
}

.card-drag-handle:active .drag-grip-right {
  cursor: grabbing;
}

.drag-grip-right svg {
  width: 56px;
  height: 56px;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.mission-card.is-priority {
  border-color: #ef4d3d;
  box-shadow:
    0 0 0 4px color-mix(in srgb, #ef4d3d 40%, transparent),
    0 0 32px color-mix(in srgb, #ef4d3d 35%, transparent),
    var(--soft-shadow);
}

.status-pill:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}


.mission-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  flex: 1;
  min-height: 0;
  padding: 0 28px 28px;
}

.thumbnail-button {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, color-mix(in srgb, var(--ink) 8%, transparent));
  border-radius: 16px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 6%, color-mix(in srgb, var(--surface) 70%, transparent)) 0%,
      color-mix(in srgb, var(--surface) 80%, transparent) 100%
    );
  box-shadow: 0 1px 0 color-mix(in srgb, #ffffff 14%, transparent) inset;
  transition:
    box-shadow 200ms ease,
    transform 200ms ease,
    border-color 200ms ease;
}

.thumbnail-button.is-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.thumbnail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.thumbnail-q {
  font-size: 130px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--ink) 36%, transparent);
}

.thumbnail-hint {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  opacity: 0.7;
}

.thumbnail-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 200ms ease,
    transform 220ms ease;
}

.thumbnail-button span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(24, 25, 22, 0.82);
  color: #fffdf4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.thumbnail-button:hover {
  z-index: 2;
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 14px 30px rgba(31, 35, 29, 0.14);
}

.thumbnail-button:hover img {
  filter: saturate(1.05);
  transform: scale(1.02);
}

.thumbnail-button:hover span {
  opacity: 1;
  transform: translateY(0);
}

.mission-fields {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 8px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, color-mix(in srgb, var(--ink) 10%, transparent));
  border-radius: 16px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 8%, color-mix(in srgb, var(--surface) 70%, transparent)) 0%,
      color-mix(in srgb, var(--accent) 4%, color-mix(in srgb, var(--surface) 80%, transparent)) 100%
    );
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 12%, transparent) inset;
}

.field-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 78px;
  padding: 0 24px;
  background: transparent;
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease;
}

.field-row + .field-row {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 12%, color-mix(in srgb, var(--ink) 8%, transparent));
}

.field-row span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  transition: color 160ms ease;
}

.field-row strong {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-row.deadline strong::before,
.field-row.done strong::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--surface-2);
}

.field-row.deadline strong::before {
  background: #ef5443;
}

.field-row.done strong::before {
  background: var(--green);
}

.field-row:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.field-row:hover span {
  color: color-mix(in srgb, var(--accent) 78%, black);
}

.field-row.creative strong {
  position: relative;
  align-self: center;
  width: auto;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 10%, transparent) 0%,
      transparent 36%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, oklch(from var(--accent) calc(l + 0.04) c h) 42%, transparent) 0%,
      color-mix(in srgb, var(--accent) 38%, transparent) 100%
    );
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 14%, transparent) inset,
    0 -1px 0 color-mix(in srgb, var(--accent) 14%, transparent) inset;
}

.field-row.creative {
  grid-template-columns: 160px max-content;
  justify-content: start;
}

.field-row.creative:hover {
  background: transparent;
}

.field-row.creative:hover strong {
  filter: brightness(1.05);
}

.field-menu {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 480px;
  max-height: 630px;
  overflow: auto;
  padding: 21px;
  color: var(--ink);
  transform-origin: top center;
  animation: menu-bounce-in 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  isolation: isolate;
}

/* Lift the host card above its siblings while a field menu is open so the
   menu can extend beyond the card without being painted behind neighbors. */
.mission-card:has(.field-menu) {
  z-index: 80;
}

.field-menu,
.master-panel {
  position: absolute;
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 78%, transparent) 0%,
      color-mix(in srgb, var(--surface) 86%, transparent) 100%
    );
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 0 0 1px color-mix(in srgb, #ffffff 6%, transparent) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 12px 28px -12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.field-menu::before,
.master-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      120% 80% at 30% 0%,
      color-mix(in srgb, #ffffff 10%, transparent) 0%,
      transparent 55%
    );
  z-index: -1;
}

.field-menu::after,
.master-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #ffffff 18%, transparent) 0%,
    transparent 12%,
    transparent 88%,
    color-mix(in srgb, #ffffff 4%, transparent) 100%
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
  z-index: -1;
}

html[data-theme="light"] .card-drag-handle,
html[data-theme="light"] .field-row.creative strong {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 28%, transparent) 0%,
      transparent 38%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      oklch(from var(--accent) calc(l + 0.08) calc(c + 0.04) h) 0%,
      var(--accent) 100%
    );
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-theme="light"] .board-row-label {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 28%, transparent) 0%,
      transparent 38%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      oklch(from var(--row-accent) calc(l + 0.08) calc(c + 0.04) h) 0%,
      var(--row-accent) 100%
    );
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 50%, transparent) inset,
    0 -1px 0 color-mix(in srgb, oklch(from var(--row-accent) calc(l - 0.12) c h) 35%, transparent) inset,
    0 8px 22px color-mix(in srgb, var(--row-accent) 28%, transparent);
}

html[data-theme="light"] .card-drag-handle {
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 50%, transparent) inset,
    0 -1px 0 color-mix(in srgb, oklch(from var(--accent) calc(l - 0.12) c h) 35%, transparent) inset,
    0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
}

html[data-theme="light"] .field-row.creative strong {
  border-color: color-mix(in srgb, oklch(from var(--accent) calc(l - 0.12) c h) 45%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 45%, transparent) inset,
    0 -1px 0 color-mix(in srgb, oklch(from var(--accent) calc(l - 0.12) c h) 30%, transparent) inset;
}

html[data-theme="light"] .field-menu,
html[data-theme="light"] .master-panel {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 82%, transparent) 0%,
      color-mix(in srgb, #ffffff 90%, transparent) 100%
    );
  border-color: color-mix(in srgb, #ffffff 72%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 30px 60px -22px rgba(35, 39, 32, 0.28),
    0 12px 28px -14px rgba(35, 39, 32, 0.18);
}

@keyframes menu-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.78) translateY(-10px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.creative-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.date-menu {
  gap: 14px;
}

.date-boxes {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 6px 0 2px;
}

.date-box {
  text-align: center;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.date-box-day,
.date-box-month {
  width: 64px;
}

.date-box-year {
  width: 96px;
}

.date-box::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  font-weight: 700;
}

.date-box:focus {
  border-color: color-mix(in srgb, var(--accent, #7a57ff) 60%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7a57ff) 18%, transparent);
}

.date-box.is-invalid {
  border-color: #d33;
  box-shadow: 0 0 0 3px color-mix(in srgb, #d33 24%, transparent);
  animation: date-shake 360ms ease;
}

@keyframes date-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

.date-sep {
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

.date-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.date-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, filter 160ms ease;
}

.date-action:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}

.date-action-today {
  background: var(--surface);
}

.date-action-done {
  background: linear-gradient(180deg, #4caf6e 0%, #2f8f51 100%);
  color: #fff;
  border-color: transparent;
}

.date-action-done:hover {
  filter: brightness(1.06);
}

.date-action-clear {
  color: var(--muted);
}

.date-action-clear:hover {
  color: var(--ink);
}

.field-menu.productId {
  top: 70px;
  left: 18px;
  width: 540px;
}

.field-menu.status {
  top: 174px;
  right: 28px;
}

.field-menu.creativeLead,
.field-menu.owner,
.field-menu.partners,
.field-menu.deadline,
.field-menu.doneDate {
  top: 190px;
  right: 28px;
}

.menu-label {
  padding: 6px 9px 15px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-option {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 0 21px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  text-align: left;
}

.menu-option:hover,
.menu-option.selected {
  background: var(--surface-3);
}

.menu-option svg {
  margin-left: auto;
}

.tag-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.field-menu .mini-product {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  font-size: 22px;
}

.floating-toolbar,
.quick-add,
.zoom-controls,
.mini-map {
  position: absolute;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--topbar-bg);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(10px);
}

.floating-toolbar {
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
}

.tool {
  width: 48px;
  height: 48px;
  border: 1px solid transparent;
  cursor: grab;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), background 160ms ease;
}

.tool:not(.active):hover {
  transform: translateY(-2px);
  background: var(--surface-3);
}

.tool:active {
  cursor: grabbing;
}

.tool.active {
  border-color: var(--line);
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}

.quick-add {
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  padding: 8px;
}

.quick-add > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  font-size: 14px;
}

.group-toggle {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.group-toggle-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 7px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group-toggle-option:hover:not(.is-active) {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.group-toggle-option.is-active {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 2px 6px rgba(0, 0, 0, 0.18);
}

.group-toggle-option svg {
  width: 16px;
  height: 16px;
}

.zoom-controls {
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.zoom-controls button {
  width: 34px;
  height: 34px;
}

.zoom-controls span {
  width: 48px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.mini-map {
  left: 22px;
  bottom: 18px;
  width: 158px;
  height: 96px;
  overflow: hidden;
}

.map-dot {
  position: absolute;
  height: 9px;
  border-radius: 4px;
  background: rgba(24, 25, 22, 0.3);
}

.map-dot.selected {
  background: var(--violet);
}

.inspector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 18px;
  border-left: 1px solid var(--line);
}

.inspector-top {
  min-height: 38px;
  color: #4e5149;
  font-size: 14px;
  font-weight: 850;
}

.selected-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.selected-preview p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.selected-preview h3 {
  margin: 0 0 18px;
  font-size: 23px;
  line-height: 1.08;
}

.preview-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-status strong {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 13px;
}

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

.stat-grid div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-grid strong,
.stat-grid span {
  display: block;
}

.stat-grid strong {
  font-size: 22px;
}

.stat-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

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

.property-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.property-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.property-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-health {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card-health span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.card-health div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.card-health i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.wide-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  cursor: pointer;
  font-weight: 850;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
}

.empty-state p {
  margin: -28px 0 0;
  font-weight: 820;
}

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(24, 25, 22, 0.18);
  backdrop-filter: blur(2px);
}

.master-panel {
  position: fixed;
  /* Center without transform — transform would create a containing block
     for fixed descendants (the color picker), throwing off its positioning. */
  inset: 0;
  margin: auto;
  z-index: 31;
  display: grid;
  gap: 18px;
  width: min(960px, calc(100vw - 48px));
  height: fit-content;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px 32px;
  color: var(--ink);
  isolation: isolate;
}

.master-field-tags .creative-tags-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.master-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.master-head h3 {
  margin: 0;
  font-size: 24px;
}

.master-field {
  display: grid;
  gap: 7px;
}

.master-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.master-field textarea {
  min-height: 82px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  line-height: 1.35;
}

.master-field small {
  color: var(--muted);
  font-size: 12px;
}

.creative-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.creative-tag {
  --accent: #7a57ff;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: color-mix(in srgb, var(--accent) 35%, var(--ink));
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.creative-tag:has(.creative-color-picker),
.creative-tag:has(.product-thumb-picker) {
  z-index: 50;
}

.creative-tag:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 24%, var(--surface));
}

.creative-color-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(24, 25, 22, 0.18);
  cursor: pointer;
  transition: transform 160ms ease;
}

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

.creative-name-btn {
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0 2px;
}

.creative-name-input {
  width: 96px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.creative-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}

.creative-remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--accent) 70%, black);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 160ms ease, background 160ms ease;
}

.creative-remove:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.master-link-btn,
.master-link-avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.master-link-btn img,
.master-link-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.master-link-btn.is-unlinked {
  opacity: 0.45;
}

.master-link-btn.is-unlinked:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  transform: scale(1.08);
}

.master-link-btn.is-linked-me {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--surface);
  padding: 0;
}

.master-link-btn.is-linked-me:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.master-link-avatar.is-linked-other {
  cursor: default;
  opacity: 0.55;
  background: color-mix(in srgb, var(--ink) 8%, var(--surface));
  color: var(--muted);
}

.creative-color-picker {
  position: fixed;
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: menu-bounce-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top left;
}

.creative-color-option {
  width: 26px;
  height: 26px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: transform 140ms ease;
}

.creative-color-option:hover {
  transform: scale(1.1);
}

.creative-color-option.selected {
  box-shadow: 0 0 0 2px var(--ink);
}

.creative-add {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px dashed rgba(24, 25, 22, 0.24);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.creative-add:hover {
  border-color: rgba(122, 87, 255, 0.5);
  color: #7a57ff;
  background: rgba(122, 87, 255, 0.06);
  transform: translateY(-1px);
}

.creative-tag-adding {
  --accent: #7a57ff;
}

.creative-tags-row-products {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.creative-tag-product {
  --accent: #7a57ff;
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  height: 52px;
  padding: 0 12px 0 6px;
  gap: 12px;
  align-self: stretch;
  justify-content: flex-start;
  border-radius: 12px;
}

.creative-tags-row-products .creative-tag-product .product-name-btn,
.creative-tags-row-products .creative-tag-product .product-name-input {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.creative-tags-row-products .creative-add {
  align-self: flex-start;
}

.creative-tag-product:hover {
  background: var(--surface-3);
}

.product-thumb-btn {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
}

.product-thumb-btn-static {
  cursor: default;
}

.product-thumb-img,
.product-thumb-icon,
.product-thumb-fallback {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: 22px;
  text-transform: lowercase;
  object-fit: cover;
}

.product-thumb-img {
  display: block;
  border-radius: 10px;
}

.product-thumb-picker {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  width: 296px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: menu-bounce-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top left;
}

.product-thumb-picker-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.product-thumb-option {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.product-thumb-option:hover {
  transform: scale(1.08);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.product-thumb-option.selected {
  border-color: var(--ink);
  background: var(--surface-3);
}

.product-thumb-upload,
.product-thumb-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.product-thumb-upload:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.product-thumb-clear {
  font-weight: 600;
  color: var(--muted);
}

.product-name-input,
.product-name-btn {
  font-size: 15px;
}

.product-symbol.has-thumb {
  padding: 0;
  overflow: hidden;
}

.product-symbol.has-thumb .product-thumb-img,
.product-symbol.has-thumb .product-thumb-icon,
.product-symbol.has-thumb .product-thumb-fallback {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.product-symbol.has-thumb .product-thumb-icon svg {
  width: 60%;
  height: 60%;
}

.mini-product .product-thumb-img,
.mini-product .product-thumb-icon,
.mini-product .product-thumb-fallback {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
}

.creative-tag[draggable="true"] {
  cursor: grab;
}

.creative-tag[draggable="true"]:active {
  cursor: grabbing;
}

.creative-tag.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.creative-tag.drag-over {
  outline: 2px dashed color-mix(in srgb, var(--accent) 80%, transparent);
  outline-offset: 3px;
  background: color-mix(in srgb, var(--accent) 30%, var(--surface));
}

.tag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 24px;
  margin-right: 4px;
  margin-left: -2px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  cursor: grab;
  border-radius: 6px;
  transition: color 160ms ease, background 160ms ease;
}

.creative-tag:hover .tag-grip {
  color: color-mix(in srgb, var(--ink) 90%, transparent);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.creative-tag.dragging .tag-grip {
  cursor: grabbing;
}

.tag-grip svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.creative-tag-plain {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.creative-tag.is-builtin {
  cursor: default;
}

.creative-tag.is-builtin .creative-name-btn {
  cursor: text;
}

.creative-builtin-lock {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: color-mix(in srgb, var(--accent) 75%, black);
  opacity: 0.7;
}

.creative-tag-plain:hover {
  background: var(--surface-3);
}

.master-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.master-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.master-actions button:last-child {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 236px;
  }

  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: 0 1fr;
  }

  .sidebar {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100vw;
    padding: 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell.sidebar-collapsed .sidebar {
    transform: translateY(-100%);
  }

  .brand-block {
    flex: 0 0 auto;
  }

  .search-pill,
  .sidebar-panel,
  .team-strip {
    display: none;
  }

  .board-list {
    display: flex;
    min-width: max-content;
  }

  .board-link {
    white-space: nowrap;
  }

  .workspace {
    min-height: calc(100vh - 68px);
    grid-template-rows: 72px minmax(640px, 1fr);
  }

  .topbar {
    padding: 0 12px;
  }

  .board-badge,
  .presence,
  .icon-button {
    display: none;
  }

  .board-heading h2 {
    font-size: 19px;
  }

  .floating-toolbar {
    left: 12px;
  }

  .quick-add,
  .zoom-controls {
    right: 12px;
  }

  .mini-map {
    display: none;
  }
}

/* =============== Sign-in gate =============== */

.signin-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 24px;
  background:
    radial-gradient(900px 500px at 20% 15%, color-mix(in srgb, var(--accent, #7a57ff) 14%, transparent), transparent 60%),
    radial-gradient(800px 500px at 80% 85%, color-mix(in srgb, var(--green) 10%, transparent), transparent 60%),
    var(--bg);
}

.signin-theme {
  position: absolute;
  top: 24px;
  right: 24px;
}

.signin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 48px 44px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 18%, transparent) inset,
    0 30px 60px -22px rgba(0, 0, 0, 0.45),
    0 12px 28px -14px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: signin-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.signin-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.signin-brand-mark {
  width: 56px;
  height: 56px;
}

.signin-brand .eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
}

.signin-title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.signin-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
}

.signin-gsi {
  min-height: 44px;
  margin-top: 4px;
}

/* =============== Homepage =============== */

.home-shell {
  height: 100vh;
  overflow-y: auto;
  padding: 36px 56px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  background:
    radial-gradient(1200px 600px at 0% 0%, color-mix(in srgb, var(--accent, #7a57ff) 8%, transparent), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, color-mix(in srgb, var(--green) 6%, transparent), transparent 60%),
    var(--bg);
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-brand .brand-mark {
  width: 44px;
  height: 44px;
}

.home-brand .eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.home-brand h1 {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.home-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-inbox-wrap {
  position: relative;
}

.inbox-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.inbox-btn:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}

.inbox-btn.has-pending {
  border-color: color-mix(in srgb, var(--accent, #7a57ff) 50%, transparent);
  background: color-mix(in srgb, var(--accent, #7a57ff) 12%, var(--surface));
  color: color-mix(in srgb, var(--accent, #7a57ff) 80%, var(--ink));
}

.inbox-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #f25c5c 0%, #c43838 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(196, 56, 56, 0.45);
}

.inbox-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 340px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: menu-bounce-in 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}

.inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inbox-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.inbox-head .eyebrow {
  margin: 0;
  font-size: 11px;
}

.inbox-close {
  width: 28px;
  height: 28px;
}

.inbox-empty {
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.inbox-invite {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-invite.is-orphaned {
  opacity: 0.6;
}

.inbox-invite-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.inbox-invite-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a57ff 0%, #4d35aa 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
}

.inbox-invite-avatar.has-photo {
  background: transparent;
}

.inbox-invite-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.inbox-invite-text {
  min-width: 0;
}

.inbox-invite-from {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.inbox-invite-from strong {
  color: var(--ink);
  font-weight: 800;
}

.inbox-invite-ws {
  margin: 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.inbox-invite-actions {
  display: flex;
  gap: 8px;
}

.inbox-accept,
.inbox-decline {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: background 160ms ease, transform 160ms ease;
}

.inbox-accept {
  background: linear-gradient(180deg, #4caf6e 0%, #2f8f51 100%);
  color: #fff;
  border-color: transparent;
}

.inbox-accept:hover { transform: translateY(-1px); filter: brightness(1.05); }

.inbox-decline {
  background: var(--surface);
  color: var(--muted);
}

.inbox-decline:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.workspace-share-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 3px 6px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent, #7a57ff) 18%, transparent);
  color: color-mix(in srgb, var(--accent, #7a57ff) 80%, var(--ink));
  vertical-align: -3px;
}

.workspace-share-icon svg {
  stroke-width: 2.4;
}

.share-row.is-pending .share-avatar {
  background: color-mix(in srgb, var(--accent, #7a57ff) 16%, transparent);
  color: color-mix(in srgb, var(--accent, #7a57ff) 80%, var(--ink));
}

.share-email-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.share-email-input:focus {
  border-color: color-mix(in srgb, var(--accent, #7a57ff) 60%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7a57ff) 18%, transparent);
}

.share-hint {
  margin: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.share-avatar.has-photo {
  background: transparent;
  overflow: hidden;
}

.share-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.home-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a57ff 0%, #4d35aa 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(122, 87, 255, 0.35);
}

.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 4px 28px;
  border-bottom: 1px solid var(--line);
}

.home-hero-text h2.home-hero-greeting {
  margin: 0 0 12px;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.home-hero-date {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-hero-stats {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.home-stat-chip {
  min-width: 132px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-stat-chip strong {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.home-stat-chip span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.home-section-head h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.home-section-rail {
  display: flex;
  gap: 22px;
  padding: 8px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 4px;
}

.home-section-rail::-webkit-scrollbar {
  height: 10px;
}

.home-section-rail::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 999px;
}

.home-empty-card {
  flex-shrink: 0;
  width: 480px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.home-empty-card-personal {
  width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-empty-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent, #7a57ff);
}

.home-empty-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.home-empty-card-personal p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Workspace card */

.workspace-card {
  --accent: #7a57ff;
  --spawn-delay: 0ms;
  position: relative;
  flex-shrink: 0;
  width: 360px;
  height: 260px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: var(--soft-shadow);
  transition:
    transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 240ms ease,
    border-color 200ms ease;
}

/* Spawn animation only on the first paint of this home visit. After the
   user clicks anything the .is-fresh class is gone and re-renders settle
   in place without bouncing. */
.home-shell.is-fresh .workspace-card {
  animation: workspace-spawn 440ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--spawn-delay);
}

@keyframes workspace-spawn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.workspace-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18);
}

.workspace-card:active {
  transform: translateY(-2px) scale(1.01);
}

.workspace-card-cover {
  position: relative;
  height: 156px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    oklch(from var(--accent) calc(l + 0.16) calc(c + 0.06) h) 0%,
    var(--accent) 100%
  );
}

.workspace-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 480ms ease;
}

.workspace-card:hover .workspace-card-cover img {
  transform: scale(1.06);
}

.workspace-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.workspace-card-shared-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
}

.workspace-card-meta {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace-card-meta h4 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-card-members {
  display: flex;
}

.workspace-card-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 80%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 2px solid var(--surface);
  margin-left: -6px;
}

.workspace-card-avatar:first-child {
  margin-left: 0;
}

.workspace-card-avatar-extra {
  background: var(--surface-3);
  color: var(--ink);
}

.workspace-card-count {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workspace-card-foot {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* + New tile */

.workspace-card-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  border: 2px dashed color-mix(in srgb, var(--accent, #7a57ff) 35%, var(--line));
  color: var(--ink);
}

.workspace-card-new:hover {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-color: color-mix(in srgb, #7a57ff 55%, transparent);
}

.workspace-card-new-glyph {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: color-mix(in srgb, #7a57ff 18%, transparent);
  color: #7a57ff;
}

.workspace-card-new-label {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Workspace topbar — back-to-home button */

/* User switcher dropdown on the homepage avatar */

.home-user {
  position: relative;
}

.home-avatar {
  border: 0;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-avatar:hover {
  transform: scale(1.06);
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  min-width: 240px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: menu-bounce-in 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}

.user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
}

.user-menu-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a57ff 0%, #4d35aa 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.user-menu-avatar.small {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.user-menu-avatar-add {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
}

.user-menu-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.user-menu-sub {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-menu-email {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.user-menu-avatar.has-photo,
.home-avatar.has-photo {
  background: transparent;
  overflow: hidden;
  padding: 0;
}

.user-menu-avatar.has-photo img,
.home-avatar.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.user-menu-auth {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}

.gsi-host {
  display: flex;
  justify-content: center;
  min-height: 32px;
}

.user-menu-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.user-menu-signout:hover {
  background: var(--surface-3);
}

.user-menu-signout svg {
  transform: rotate(180deg);
}

.user-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 0 -4px 10px;
}

.user-menu-label {
  margin: 4px 6px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--surface-3);
}

.user-menu-add {
  margin-top: 6px;
  font-weight: 700;
  color: var(--ink);
}

/* Share modal */

.share-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 31;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, calc(100vw - 36px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-overlay);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  color: var(--ink);
  animation: menu-bounce-in 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}

.share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.share-owner {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.share-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
}

.share-row-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.share-row-text strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.share-row-text span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.share-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a57ff 0%, #4d35aa 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.share-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.share-remove:hover {
  background: color-mix(in srgb, #ef4d3d 18%, transparent);
  color: #ef4d3d;
}

.share-empty {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.share-add {
  display: flex;
  gap: 10px;
}

.share-select {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.share-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.share-add-btn:hover {
  filter: brightness(1.06);
}

.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.back-to-home svg {
  transform: rotate(90deg);
  opacity: 0.7;
}

.back-to-home:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--ink);
}

.menu-add-teammate {
  border-top: 1px solid var(--line);
  margin-top: 9px;
  padding-top: 9px;
}

.menu-add-teammate-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 18px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.menu-add-teammate-input::placeholder {
  color: var(--muted);
}

.menu-add-teammate-input:focus {
  border-color: color-mix(in srgb, var(--ink) 35%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}

/* Mini board-card on the homepage — same visual recipe as the real
   .card-drag-handle: a rounded master-color band floating inside the card,
   over a soft glass body. */
.task-card {
  --accent: #7a57ff;
  --spawn-delay: 0ms;
  position: relative;
  flex-shrink: 0;
  width: 280px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, color-mix(in srgb, var(--ink) 14%, transparent));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px;
  cursor: pointer;
  scroll-snap-align: start;
  isolation: isolate;
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 14%, transparent) inset,
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent) inset,
    0 22px 48px -22px rgba(0, 0, 0, 0.42),
    0 8px 18px -10px rgba(0, 0, 0, 0.28);
  transition:
    transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 220ms ease,
    border-color 200ms ease;
}

.home-shell.is-fresh .task-card {
  animation: workspace-spawn 440ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--spawn-delay);
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, color-mix(in srgb, var(--ink) 18%, transparent));
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 18%, transparent) inset,
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent) inset,
    0 28px 56px -22px rgba(0, 0, 0, 0.5),
    0 12px 22px -10px rgba(0, 0, 0, 0.32);
}

.task-card-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.005em;
  line-height: 1.25;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffffff 14%, transparent) 0%,
      transparent 38%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, oklch(from var(--accent) calc(l + 0.06) c h) 80%, var(--surface)) 0%,
      color-mix(in srgb, var(--accent) 72%, var(--surface)) 100%
    );
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 -1px 0 color-mix(in srgb, var(--accent) 24%, transparent) inset,
    0 4px 14px -6px color-mix(in srgb, var(--accent) 55%, transparent);
}

.task-card-band-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.task-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 8px 6px;
}

.task-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.task-card-product {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.task-card-status {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  color: #111;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 30%, transparent) inset,
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.task-card-meta {
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.task-card-workspace {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
  opacity: 0.85;
}

.task-card-deadline {
  flex: 0 0 auto;
  letter-spacing: 0.01em;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 75%, transparent);
  font-weight: 600;
}

/* Checklist inspector — same glass material language as the settings panel */
.checklist-panel {
  --accent: #7a57ff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 22px 26px;
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 14%, color-mix(in srgb, var(--surface) 76%, transparent)) 0%,
      color-mix(in srgb, var(--surface) 86%, transparent) 100%
    );
  border: 1px solid color-mix(in srgb, var(--accent) 18%, color-mix(in srgb, var(--ink) 14%, transparent));
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 22%, transparent) inset,
    0 0 0 1px color-mix(in srgb, #ffffff 6%, transparent) inset;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.checklist-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-head .eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.checklist-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.checklist-progress-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
}

.checklist-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}

.checklist-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 70%, transparent) 0%,
    var(--accent) 100%
  );
  transition: width 220ms ease;
}

.checklist-empty-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 50vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.checklist-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  transition: background 160ms ease, border-color 160ms ease;
}

.checklist-item:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.checklist-item.is-done {
  background: color-mix(in srgb, var(--accent) 6%, color-mix(in srgb, var(--surface) 58%, transparent));
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.checklist-toggle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 7px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.checklist-toggle:hover {
  border-color: var(--accent);
}

.checklist-item.is-done .checklist-toggle {
  background: var(--accent);
  border-color: var(--accent);
}

.checklist-text {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 0;
}

.checklist-item.is-done .checklist-text {
  text-decoration: line-through;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.checklist-text::placeholder {
  color: color-mix(in srgb, var(--ink) 35%, transparent);
  font-weight: 500;
}

.checklist-remove {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.checklist-item:hover .checklist-remove,
.checklist-item:focus-within .checklist-remove {
  opacity: 1;
}

.checklist-remove:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
}

.checklist-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 36%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 200ms ease;
}

.checklist-add:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  transform: translateY(-1px);
}
