/* Orbit — tasks in motion */

:root {
  --bg: #f3eef8;
  --ink: #1b1424;
  --muted: #6b5f7a;
  --faint: #948aa3;
  --line: color-mix(in srgb, var(--ink) 8%, transparent);
  --accent: #7c5cbf;
  --accent-2: #9a7ad4;
  --accent-ink: #3d2a6b;
  --card: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(27, 20, 36, 0.04),
    0 10px 28px -10px rgba(124, 92, 191, 0.18);
  --shadow-hover: 0 2px 4px rgba(27, 20, 36, 0.05),
    0 16px 36px -12px rgba(124, 92, 191, 0.28);
  --font-ui: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Literata", "Iowan Old Style", "Palatino Linotype", serif;
  --space: 8px;
  --today: #7c5cbf;
  --urgent: #c45c6a;
  --high: #d4894a;
  --done: #4f9a72;
  --wait: #c9a227;
  --code: #4a6cb5;
  --home: #c45c8a;
  --design: #7c5cbf;
  --launch: #7c5cbf;
  --personal: #c45c8a;
  --hire: #4a8bb5;
  --finance: #c9a227;
  --learning: #4f9a72;
  --header-h: 72px;
  --nav-h: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-ui);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-view="board"] {
  height: 100dvh;
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

input,
textarea,
select {
  background: var(--card);
  border: 1px solid var(--line);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

p {
  margin: 0;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, white);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* ——— layout ——— */

.layout {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 8px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  flex: 0 0 auto;
}

.logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  position: relative;
}

.logo svg {
  width: 40px;
  height: 40px;
}

.logo-spin {
  transform-origin: 16px 16px;
  transform-box: fill-box;
  animation: orbit-spin 22s linear infinite;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workspace {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.tagline {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.quick {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 16px;
  padding: 4px 4px 4px 14px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--ink) 5%, transparent);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.quick:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent),
    var(--shadow);
}

.quick svg {
  color: var(--faint);
  flex: 0 0 auto;
}

.quick input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  outline: none;
  min-width: 0;
}

.quick input::placeholder {
  color: var(--faint);
  font-weight: 500;
}

.quick-go {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  transition: transform 140ms ease, filter 140ms ease;
}

.quick-go:hover {
  filter: brightness(1.06);
}

.quick-go:active {
  transform: scale(0.97);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn,
.kbd-btn {
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: color-mix(in srgb, white 70%, var(--bg));
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.icon-btn:hover,
.kbd-btn:hover {
  background: var(--card);
  box-shadow: var(--shadow);
}

.kbd-btn kbd {
  font-family: var(--font-ui);
  font-size: 11px;
  background: color-mix(in srgb, var(--ink) 6%, white);
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 650;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px 8px;
  padding-left: max(24px, env(safe-area-inset-left));
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, white 70%, transparent);
}

.nav-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.nav-spacer {
  flex: 1;
}

.filter-chip {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.filter-chip button {
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 12px;
  line-height: 1;
}

.main {
  min-height: 0;
  padding: 8px 16px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

body[data-view="board"] .main {
  overflow: hidden;
}

/* ——— board ——— */

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: color-mix(in srgb, white 62%, var(--bg));
  border-radius: 24px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, white 70%, var(--ink));
  transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.column[data-col="today"] {
  background: color-mix(in srgb, var(--accent) 9%, white);
}

.column[data-col="inprogress"] {
  background: color-mix(in srgb, #4a8bb5 8%, white);
}

.column[data-col="done"] {
  background: color-mix(in srgb, var(--done) 9%, white);
}

.column.is-over {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.col-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 8px 12px;
}

.col-title {
  font-size: 22px;
  font-weight: 600;
}

.col-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.col-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.col-body {
  flex: 1;
  min-height: 72px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 35%, white) transparent;
}

.col-empty {
  margin: 8px 4px;
  padding: 28px 16px;
  border-radius: var(--radius);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 35%, white);
  text-align: center;
  color: var(--muted);
  background: color-mix(in srgb, white 50%, transparent);
}

.col-empty strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}

.col-empty span {
  font-size: 13px;
}

.drop-slot {
  min-height: 56px;
  border-radius: 16px;
  border: 2px dashed color-mix(in srgb, var(--accent) 70%, white);
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.inline-add {
  margin-top: auto;
  padding: 4px;
}

.add-card-btn {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  transition: background 140ms ease, color 140ms ease;
}

.add-card-btn:hover {
  background: color-mix(in srgb, white 80%, transparent);
  color: var(--ink);
}

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.inline-form input {
  border: 0;
  outline: none;
  padding: 8px 4px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

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

.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-ghost {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.btn-danger {
  background: color-mix(in srgb, var(--urgent) 12%, white);
  color: #8a2e3c;
}

.btn-wide {
  width: 100%;
}

/* ——— cards ——— */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--ink) 4%, transparent);
  cursor: grab;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  touch-action: pan-y;
  user-select: none;
  position: relative;
}

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

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card:active {
  cursor: grabbing;
}

.card.is-dragging {
  opacity: 0.35;
  transform: rotate(2deg) scale(0.98);
}

.card.is-done .card-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.card.is-urgent {
  box-shadow: var(--shadow), inset 3px 0 0 var(--urgent);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.flag {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--high);
}

.flag.urgent {
  color: var(--urgent);
}

.pts {
  flex: 0 0 auto;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.proj {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.proj::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--pc, var(--accent));
}

.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.due.is-today {
  color: var(--accent-ink);
}

.due.is-overdue {
  color: var(--urgent);
}

.recur {
  color: var(--faint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--ink) 6%, white);
  color: var(--muted);
}

.tag[data-tag="design"] {
  background: #ece4f7;
  color: #5c3d9a;
}

.tag[data-tag="code"] {
  background: #e4eaf7;
  color: #3d4e8a;
}

.tag[data-tag="wait"] {
  background: #f7efd8;
  color: #8a6a2b;
}

.tag[data-tag="home"] {
  background: #f7e4ec;
  color: #8a3d5c;
}

.drag-clone {
  position: fixed;
  z-index: 70;
  width: 280px;
  pointer-events: none;
  transform: rotate(3deg) scale(1.03);
  box-shadow: var(--shadow-hover);
  opacity: 0.96;
}

/* ——— list ——— */

.list-view {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 8px 48px;
}

.group {
  margin-bottom: 28px;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 8px 12px;
}

.group-title {
  font-size: 26px;
}

.group-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  transition: background 140ms ease;
}

.row:hover,
.row.is-selected {
  background: var(--card);
  box-shadow: var(--shadow);
}

.row.is-selected {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, white);
  outline-offset: 0;
}

.row.is-done .row-title {
  color: var(--faint);
  text-decoration: line-through;
}

.check {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent);
  display: grid;
  place-items: center;
  background: white;
  transition: background 140ms ease, border-color 140ms ease;
}

.check svg {
  opacity: 0;
  width: 12px;
  height: 12px;
}

.row.is-done .check,
.check.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.row.is-done .check svg,
.check.is-on svg {
  opacity: 1;
}

.row-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.row-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

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

.kbd-hint {
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  margin-top: 8px;
}

.kbd-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 7%, white);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
}

/* ——— calendar ——— */

.cal-view {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 8px 40px;
}

.cal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 16px;
}

.cal-title {
  font-size: 32px;
  flex: 1;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 0;
}

.day {
  min-height: 112px;
  background: color-mix(in srgb, white 70%, var(--bg));
  border-radius: 16px;
  padding: 8px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.day:hover {
  background: var(--card);
  border-color: var(--line);
}

.day.is-today {
  background: color-mix(in srgb, var(--accent) 10%, white);
  border-color: color-mix(in srgb, var(--accent) 30%, white);
}

.day.is-other {
  opacity: 0.45;
}

.day-num {
  font-size: 12px;
  font-weight: 750;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  display: grid;
  place-items: center;
}

.day.is-today .day-num {
  background: var(--accent);
  color: #fff;
}

.cal-pill {
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid var(--pc, var(--accent));
}

.cal-pill.is-done {
  color: var(--faint);
  text-decoration: line-through;
}

.cal-pill:hover {
  filter: brightness(0.97);
}

.cal-more {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 6px;
}

/* ——— projects ——— */

.proj-view {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 8px 48px;
}

.proj-lead {
  margin-bottom: 20px;
  padding: 8px 8px 0;
}

.proj-lead h2 {
  font-size: 32px;
}

.proj-lead p {
  color: var(--muted);
  margin-top: 6px;
  max-width: 48ch;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.proj-card {
  background: var(--card);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
  border: 1px solid color-mix(in srgb, var(--ink) 4%, transparent);
}

.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.proj-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--pc);
}

.proj-card h3 {
  font-size: 26px;
  margin: 10px 0 6px;
}

.proj-card .blurb {
  color: var(--muted);
  font-size: 13px;
  min-height: 36px;
}

.bar {
  height: 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 6%, white);
  overflow: hidden;
  display: flex;
  margin: 16px 0 10px;
}

.bar i {
  display: block;
  height: 100%;
}

.bar .fill {
  background: var(--pc, var(--accent));
  border-radius: 99px;
}

.stack i {
  height: 100%;
}

.stack .s-backlog {
  background: color-mix(in srgb, var(--ink) 18%, white);
}

.stack .s-today {
  background: var(--accent);
}

.stack .s-inprogress {
  background: var(--hire);
}

.stack .s-done {
  background: var(--done);
}

.proj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.proj-pct {
  margin-left: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 650;
}

.mini-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-list button {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
  color: var(--ink);
  display: flex;
  gap: 8px;
}

.mini-list button span {
  color: var(--faint);
  font-weight: 600;
  font-size: 11px;
  margin-left: auto;
}

/* ——— focus ——— */

.focus-view {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 64px;
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 70%
  );
}

.focus-kicker {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 16px;
}

.focus-title {
  font-size: clamp(36px, 6vw, 64px);
  text-align: center;
  max-width: 16ch;
  line-height: 1.12;
  font-weight: 650;
}

.focus-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

.focus-notes {
  max-width: 46ch;
  text-align: center;
  color: var(--muted);
  margin-top: 16px;
  font-size: 15px;
}

.focus-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.focus-actions .btn {
  height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  font-size: 15px;
}

.focus-next {
  margin-top: 36px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
}

.focus-empty {
  text-align: center;
}

.focus-empty h2 {
  font-size: 42px;
  margin-bottom: 8px;
}

.focus-empty p {
  color: var(--muted);
}

/* ——— drawer ——— */

.overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.overlay.is-on {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: var(--bg);
  z-index: 50;
  transform: translateX(104%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: -24px 0 60px rgba(27, 20, 36, 0.12);
  display: flex;
  flex-direction: column;
}

.drawer.is-on {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 8px;
}

.drawer-head h2 {
  flex: 1;
  font-size: 18px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 8px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input,
.field textarea,
.field select {
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.title-input {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
}

.chip.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.drawer-foot {
  display: flex;
  gap: 8px;
  padding: 12px 20px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* ——— palette ——— */

.palette-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 18vh 16px 16px;
}

.palette {
  width: min(560px, 100%);
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(27, 20, 36, 0.22);
  overflow: hidden;
  border: 1px solid var(--line);
  pointer-events: auto;
  height: fit-content;
}

.palette-q {
  width: 100%;
  border: 0;
  padding: 16px 18px;
  font-size: 16px;
  outline: none;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.palette-list {
  max-height: min(420px, 56vh);
  overflow: auto;
  padding: 8px;
}

.pal-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 10px 10px;
  border-radius: 12px;
}

.pal-item.is-active,
.pal-item:hover {
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.pal-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.pal-k {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
}

.pal-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

/* ——— toasts ——— */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--ink);
  color: #fff;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-hover);
  animation: toast-in 220ms ease;
}

.toast button {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: color-mix(in srgb, white 16%, transparent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— mobile ——— */

@media (max-width: 960px) {
  body[data-view="board"] {
    overflow: auto;
  }

  .top {
    flex-wrap: wrap;
    padding: 12px 12px 8px;
  }

  .brand {
    min-width: 0;
  }

  .tagline {
    display: none;
  }

  .quick {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }

  .stat-pill {
    display: none;
  }

  .nav {
    padding: 0 12px 8px;
  }

  .main {
    padding: 4px 12px 16px;
  }

  .board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 12px;
    gap: 12px;
    height: auto;
    min-height: calc(100dvh - 148px);
    padding-bottom: 8px;
  }

  .column {
    flex: 0 0 min(86vw, 340px);
    scroll-snap-align: start;
    max-height: calc(100dvh - 160px);
  }

  .cal-grid {
    gap: 4px;
  }

  .day {
    min-height: 84px;
    padding: 6px;
    border-radius: 12px;
  }

  .cal-title {
    font-size: 24px;
  }

  .focus-title {
    font-size: 36px;
  }

  .row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .row-side {
    display: none;
  }
}

@media (max-width: 640px) {
  .workspace {
    font-size: 16px;
  }

  .kbd-btn span.label {
    display: none;
  }

  .col-hint {
    display: none;
  }

  .cal-pill {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .logo-spin {
    animation: none;
  }
}
