    :root {
      /* Typography */
      --font: Arial, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, sans-serif;
      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

      /* Matte dark surfaces (no pure black) */
      --bg: #0E1116;
      --surface: #141A22;
      --surface2: #171F2A;
      --surface3: #1B2430; /* elevated */
      --border: #263042;

      /* Text (aiming for WCAG contrast) */
      --text: #E6EAF0;
      --muted: #A9B1BE;
      --muted2: #8C96A6;

      /* One accent max */
      --accent: #6B7CFF;

      /* States */
      --danger: #D97777; /* used sparingly with labels */

      /* Spacing scale */
      --s4: 4px;
      --s8: 8px;
      --s12: 12px;
      --s16: 16px;
      --s24: 24px;
      --s32: 32px;

      /* Radii */
      --r10: 10px;
      --r12: 12px;
      --r16: 16px;

      /* Shadows (subtle, calm) */
      --shadow1: 0 8px 22px rgba(0,0,0,0.35);
      --shadow2: 0 12px 34px rgba(0,0,0,0.40);

      /* Motion */
      --t: 160ms;
      --column-max-height: min(72vh, 760px);
    }

    * { box-sizing: border-box; }
    html, body { height: 100%; }

    body {
      margin: 0;
      font-family: var(--font);
      color: var(--text);
    }

    a { color: var(--text); }
    code { font-family: var(--mono); }

    .searchPrefix {
      font-family: var(--mono);
      color: var(--muted);
    }

    .toggleLabel {
      font-size: 13px;
      color: var(--muted);
    }

    .importBtn {
      cursor: pointer;
    }

    .importInput {
      display: none;
    }

    .wrap {
      width: 100%;
      margin: 0;
      padding: 0;
    }

    .toolbarShell {
      margin-top: 0;
      border: 1px solid var(--border);
      border-radius: var(--r16);
      background: var(--surface);
      padding: var(--s12);
      display: grid;
      gap: var(--s12);
    }

    .headerRow {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: var(--s12);
      align-items: center;
    }

    .titleBlock {
      display: flex;
      gap: var(--s12);
      align-items: center;
      min-width: 240px;
    }

    .title {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0.2px;
      margin: 0;
      line-height: 1.2;
    }

    .sub {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-family: var(--mono);
    }

    .controls {
      display: flex;
      gap: var(--s8);
      justify-content: space-between;
      align-items: center;
      min-width: 0;
    }

    .controlsPrimary,
    .controlsSecondary {
      display: flex;
      gap: var(--s8);
      align-items: center;
      flex-wrap: wrap;
    }

    .controlsPrimary {
      justify-content: flex-start;
    }

    .controlsSecondary {
      justify-content: flex-end;
      min-width: 0;
    }

    .boardSwitch {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px;
      border: 1px solid var(--border);
      border-radius: var(--r12);
      background: var(--surface2);
    }

    .boardBtn {
      min-height: 34px;
      padding: 6px 10px;
      font-size: 12px;
      white-space: nowrap;
    }

    .boardBtn.is-active {
      border-color: rgba(107,124,255,0.55);
      background: rgba(107,124,255,0.16);
    }

    .input {
      display: inline-flex;
      align-items: center;
      gap: var(--s8);
      padding: 10px 12px;
      border-radius: var(--r12);
      background: var(--surface);
      border: 1px solid var(--border);
      min-height: 40px;
    }

    .input input, .input select {
      background: transparent;
      border: 0;
      outline: none;
      color: var(--text);
      font-family: var(--font);
      min-width: 200px;
    }

    .input select { min-width: 170px; }

    .btn {
      min-height: 40px;
      padding: 10px 12px;
      border-radius: var(--r12);
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      cursor: pointer;
      transition: transform var(--t) ease, background var(--t) ease, border-color var(--t) ease;
      user-select: none;
    }

    .btn:hover { transform: translateY(-1px); border-color: rgba(107,124,255,0.55); }

    .btn.primary {
      border-color: rgba(107,124,255,0.55);
      background: rgba(107,124,255,0.12);
    }

    .btn.ghost {
      background: transparent;
    }

    .toggle {
      display: inline-flex;
      align-items: center;
      gap: var(--s8);
      padding: 10px 12px;
      border-radius: var(--r12);
      border: 1px solid var(--border);
      background: var(--surface);
      min-height: 40px;
      cursor: pointer;
      user-select: none;
    }

    .toggle input { width: 16px; height: 16px; }

    .statusBar {
      padding: 10px 12px;
      border-radius: var(--r12);
      border: 1px solid var(--border);
      background: var(--surface2);
      display: flex;
      gap: var(--s12);
      align-items: center;
      flex-wrap: wrap;
    }
    .banner {
      margin-top: var(--s12);
      padding: 10px 12px;
      border-radius: var(--r12);
      border: 1px solid #f1c087;
      background: #fff3e0;
      color: #4a2b00;
      font-weight: 600;
      display: none;
    }
    .banner.show { display: block; }

    .chip {
      font-size: 12px;
      color: var(--muted);
      font-family: var(--mono);
      padding: 4px 8px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.02);
      display: inline-flex;
      gap: 8px;
      align-items: center;
    }

    .chip strong { color: var(--text); font-weight: 700; }

    .chip.accent { border-color: rgba(107,124,255,0.55); }
    .chip.error { border-color: rgba(217,119,119,0.65); }

    .chip .dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: var(--muted2);
    }

    .chip.accent .dot { background: var(--accent); }
    .chip.error .dot { background: var(--danger); }

    .chipValue {
      margin-left: 6px;
    }

    .board {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: var(--s12);
      align-items: stretch;
    }

    .col {
      display: flex;
      flex-direction: column;
      border-radius: var(--r16);
      background: var(--surface);
      border: 1px solid var(--border);
      overflow: visible;
      min-height: 260px;
      height: 100%;
      max-height: var(--column-max-height);
    }

    .colHead {
      position: relative;
      top: 0;
      z-index: 10;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: var(--s12);
      background: rgba(20,26,34,0.94);
      border-bottom: 1px solid var(--border);
    }

    .colTitle {
      font-size: 12px;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 800;
    }

    .count {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text);
      padding: 4px 8px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: rgba(255,255,255,0.02);
    }

    .colBody {
      flex: 1 1 auto;
      padding: var(--s12);
      min-height: 220px;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: thin;
      scrollbar-color: rgba(107,124,255,0.35) rgba(255,255,255,0.04);
    }

    .colBody::-webkit-scrollbar {
      width: 10px;
    }

    .colBody::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.04);
      border-radius: 999px;
    }

    .colBody::-webkit-scrollbar-thumb {
      background: rgba(107,124,255,0.35);
      border-radius: 999px;
      border: 2px solid rgba(20,26,34,0.9);
    }

    .colBody.dragOver {
      outline: 2px dashed rgba(107,124,255,0.45);
      outline-offset: -8px;
      background: rgba(107,124,255,0.03);
    }

    .empty {
      color: var(--muted2);
      font-size: 13px;
      padding: var(--s8);
      line-height: 1.4;
    }

    /* Card: fixed-height collapsed with truncation */
    .card {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--r12);
      padding: var(--s12);
      margin-bottom: var(--s12);
      cursor: pointer;
      transition: border-color var(--t) ease, transform var(--t) ease;
      max-height: 120px;
      overflow: hidden;
      user-select: none;
    }

    .card:hover { border-color: rgba(107,124,255,0.40); }

    .card.dragging {
      opacity: 0.75;
      transform: rotate(0.2deg) scale(1.01);
      border-color: rgba(107,124,255,0.55);
    }

    .card.dropTarget {
      border-color: rgba(107,124,255,0.75);
      box-shadow: 0 0 0 2px rgba(107,124,255,0.12) inset;
    }

    .cardTop {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--s8);
    }

    .cardTitle {
      font-size: 14px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: calc(100% - 28px);
    }

    .cardPriority {
      width: 16px;
      height: 16px;
      min-width: 16px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.4);
      padding: 0;
      margin: 0;
      cursor: pointer;
      background: #2e7d32;
      box-shadow: none;
      transition: border-color var(--t) ease, transform var(--t) ease;
    }

    .cardPriority:hover {
      border-color: rgba(255, 255, 255, 0.8);
      transform: scale(1.05);
    }

    .cardPriority.red {
      background: #d64545;
    }

    .cardPriority.amber {
      background: #d9a217;
    }

    .cardPriority.green {
      background: #2e9b44;
    }

    .cardPriority.grey {
      background: #8b939f;
    }

    .metaRow {
      margin-top: var(--s8);
      display: flex;
      gap: var(--s8);
      align-items: center;
      flex-wrap: wrap;
    }

    .meta {
      font-size: 12px;
      font-family: var(--mono);
      color: var(--muted);
    }

    .summary {
      margin-top: var(--s8);
      font-size: 13px;
      color: var(--text);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.35;
    }

    .statusNotes {
      margin-top: var(--s8);
      font-size: 12px;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Details panel (non-modal) */
    .panelBackdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      display: none;
      z-index: 60;
    }

    .panel {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: min(520px, 100%);
      background: var(--surface3);
      border-left: 1px solid var(--border);
      box-shadow: var(--shadow2);
      transform: translateX(100%);
      transition: transform var(--t) ease;
      z-index: 70;
      display: flex;
      flex-direction: column;
    }

    .panel.open { transform: translateX(0); }
    .panelBackdrop.open { display: block; }

    .panelHead {
      padding: var(--s16);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: var(--s12);
    }

    .panelHeadActions {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .panelHead .h {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .panelHead .h .t {
      font-size: 14px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .panelMetaRow {
      margin-top: 6px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .panelLabel {
      font-size: 11px;
      font-family: var(--mono);
      color: var(--muted);
    }

    .panelSelect {
      font-family: var(--font);
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: var(--r12);
      padding: 6px 10px;
      outline: none;
      min-height: 32px;
    }

    .panelBody {
      padding: var(--s16);
      overflow: auto;
      display: grid;
      gap: var(--s12);
    }

    .fieldRow {
      display: grid;
      gap: var(--s8);
    }

    .fieldRow label {
      font-size: 12px;
      font-family: var(--mono);
      color: var(--muted);
    }

    .fieldRow input, .fieldRow textarea, .fieldRow select {
      font-family: var(--font);
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: var(--r12);
      padding: 10px 12px;
      outline: none;
      min-height: 40px;
    }

    .fieldRow textarea { min-height: 96px; resize: vertical; }

    .history {
      border: 1px solid var(--border);
      border-radius: var(--r12);
      background: var(--surface2);
      padding: var(--s12);
    }

    .history h3 {
      margin: 0 0 var(--s8);
      font-size: 12px;
      font-family: var(--mono);
      color: var(--muted);
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }

    .historyItem {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
      margin: 0 0 var(--s8);
    }

    .historyItem:last-child { margin-bottom: 0; }

    /* Toast (undo) */
    .toast {
      position: fixed;
      left: 50%;
      bottom: 18px;
      transform: translateX(-50%);
      z-index: 80;
      min-width: min(560px, calc(100vw - 24px));
      background: rgba(27,36,48,0.95);
      border: 1px solid var(--border);
      border-radius: var(--r12);
      box-shadow: var(--shadow1);
      padding: 10px 12px;
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: var(--s12);
    }

    .toast.open { display: flex; }

    .toast .msg {
      font-size: 13px;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .toast .actions {
      display: flex;
      gap: var(--s8);
      flex: 0 0 auto;
    }

    .toast .actions button {
      min-height: 34px;
      padding: 8px 10px;
      border-radius: var(--r10);
      border: 1px solid rgba(107,124,255,0.55);
      background: rgba(107,124,255,0.12);
      color: var(--text);
      cursor: pointer;
    }

    .toast .actions button.secondary {
      border-color: var(--border);
      background: transparent;
      color: var(--muted);
    }

    /* Mobile adaptations */
    @media (max-width: 980px) {
      .wrap { padding: var(--s12); }
      .headerRow { grid-template-columns: 1fr; }
      .controls {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
      }
      .controlsPrimary,
      .controlsSecondary {
        width: 100%;
        justify-content: flex-start;
      }
      .input input { min-width: 160px; }
      .card { max-height: 140px; }
      .panel { width: 100%; border-left: none; }
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .wrap {
      padding: 0;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .toolbarShell {
      border-radius: 12px;
      padding: 10px;
      gap: 10px;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .headerRow {
      grid-template-columns: 1fr;
      gap: 10px;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .controls {
      justify-content: flex-start;
      flex-wrap: wrap;
      overflow-x: auto;
      padding-bottom: 4px;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .controlsPrimary,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .controlsSecondary {
      width: max-content;
      flex-wrap: nowrap;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .controlsPrimary > *,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .controlsSecondary > * {
      flex: 0 0 auto;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .statusBar {
      flex-wrap: nowrap;
      overflow-x: auto;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .chip {
      flex: 0 0 auto;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .board {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: minmax(84vw, 1fr);
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      padding-bottom: 2px;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .col {
      scroll-snap-align: start;
      min-height: 60vh;
      max-height: 70dvh;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .panel {
      width: 100vw;
      max-width: 100vw;
      height: 100dvh;
      border-left: none;
    }

    :root[data-ui-shell="v2"][data-form-factor="phone"] .input input,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .input select,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .fieldRow input,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .fieldRow textarea,
    :root[data-ui-shell="v2"][data-form-factor="phone"] .fieldRow select {
      font-size: 16px;
      -webkit-text-size-adjust: 100%;
    }

    @media (prefers-reduced-motion: reduce) {
      * { transition: none !important; }
    }

:root[data-ui-skin="neo"] {
  --shadow1: 0 14px 30px rgba(0, 0, 0, 0.34);
  --shadow2: 0 20px 40px rgba(0, 0, 0, 0.4);
}

:root[data-ui-skin="neo"] .toolbarShell,
:root[data-ui-skin="neo"] .col,
:root[data-ui-skin="neo"] .panel,
:root[data-ui-skin="neo"] .toast {
  background: linear-gradient(180deg, rgba(17, 31, 50, 0.9), rgba(7, 14, 26, 0.86));
  border-color: rgba(126, 176, 255, 0.18);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.08);
}

:root[data-ui-skin="neo"] .boardSwitch,
:root[data-ui-skin="neo"] .input,
:root[data-ui-skin="neo"] .toggle,
:root[data-ui-skin="neo"] .statusBar,
:root[data-ui-skin="neo"] .history {
  background: linear-gradient(180deg, rgba(14, 27, 44, 0.92), rgba(9, 18, 31, 0.88));
  border-color: rgba(126, 176, 255, 0.18);
}

:root[data-ui-skin="neo"] .colHead {
  background:
    radial-gradient(circle at 0% 0%, rgba(120, 240, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(20, 40, 62, 0.94), rgba(12, 22, 38, 0.9));
  border-bottom-color: rgba(126, 176, 255, 0.18);
}

:root[data-ui-skin="neo"] .colHead .title,
:root[data-ui-skin="neo"] .panelHead .h .t {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-ui-skin="neo"] .colBody {
  background: linear-gradient(180deg, rgba(8, 16, 29, 0.2), rgba(8, 16, 29, 0.04));
}

:root[data-ui-skin="neo"] .card {
  background:
    radial-gradient(circle at top left, rgba(118, 239, 255, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(18, 34, 54, 0.94), rgba(10, 18, 31, 0.92));
  border-color: rgba(126, 176, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.05);
}

:root[data-ui-skin="neo"] .card:hover,
:root[data-ui-skin="neo"] .card.dropTarget,
:root[data-ui-skin="neo"] .colBody.dragOver {
  border-color: rgba(121, 246, 255, 0.42);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), 0 0 24px rgba(88, 231, 255, 0.12);
}

:root[data-ui-skin="neo"] .chip {
  background: linear-gradient(180deg, rgba(17, 33, 54, 0.9), rgba(8, 18, 31, 0.88));
  border-color: rgba(126, 176, 255, 0.18);
}

:root[data-ui-skin="neo"] .toast .actions button {
  border-color: rgba(126, 176, 255, 0.18);
  background: linear-gradient(180deg, rgba(18, 37, 60, 0.92), rgba(9, 19, 34, 0.88));
  color: var(--text);
}
