/* ── Reset & tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Sidebar (light) ── */
  --sb-w:        240px;
  --sb-bg:       #FFFFFF;
  --sb-border:   #EEF2ED;
  --sb-text:     #6E6A68;
  --sb-hover:    #F5F7F4;
  --sb-active-bg:#EEF2ED;
  --sb-active:   #5F7259;

  /* ── Sage — secondary / success / presence ── */
  --green:        #7A8F75;
  --green-dark:   #5F7259;
  --green-light:  #EEF2ED;
  --green-pale:   #F5F7F4;
  --green-mid:    #8FA589;

  /* ── Terracotta — primary actions ── */
  --amber:        #C27D5E;
  --amber-dark:   #A86848;
  --amber-light:  #F6ECE7;
  --amber-pale:   #FDF4F0;

  --blue:         #7A8F75;
  --blue-light:   #EEF2ED;
  --sky:          #7A8F75;

  --purple:       #8b6e9a;
  --purple-light: #f0e9f5;

  --red:          #c0392b;
  --red-light:    #fde8e6;

  /* ── Surface ── */
  --bg:          #FBF9F6;
  --surface:     #FFFFFF;

  --text:        #2C2A29;
  --text-2:      #2C2A29;
  --muted:       #6E6A68;
  --faint:       #888481;

  --border:      #E8DDD7;
  --border-light:#F2EDE9;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;

  --shadow-sm:  0 1px 2px rgba(44,42,41,0.04);
  --shadow:     0 1px 4px rgba(44,42,41,0.07), 0 1px 2px rgba(44,42,41,0.04);
  --shadow-md:  0 4px 20px rgba(44,42,41,0.09), 0 1px 4px rgba(44,42,41,0.04);

  --gap: 1.25rem;

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ──────────────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sb-w);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 50;
  border-right: 1px solid var(--sb-border);
  overflow-y: auto;
}

.sb-top {
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid var(--sb-border);
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  padding: 0.45rem 0.4rem;
  border-radius: var(--radius-xs);
  transition: background 0.14s;
}
.sb-brand:hover { background: var(--sb-hover); }

.sb-brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg);
  background: var(--amber);
  flex-shrink: 0;
  animation: livepulse 3s ease-in-out infinite;
}

@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.sb-brand-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sb-nav {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-xs);
  color: var(--sb-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.sb-item:hover  { background: var(--sb-hover); color: var(--text); }
.sb-item.active { background: var(--sb-active-bg); color: var(--sb-active); }
.sb-item.active .sb-icon { stroke: var(--sb-active); }

.sb-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: stroke 0.14s;
}

.sb-foot {
  padding: 0.75rem;
  border-top: 1px solid var(--sb-border);
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.4rem;
  margin-bottom: 0.25rem;
}

.sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-uname {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-signout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-xs);
  color: var(--faint);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.sb-signout:hover { background: var(--sb-hover); color: var(--text); }

/* ── Mobile top bar ─────────────────────────────────────────── */
.mobile-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  background: var(--sb-bg);
  border-bottom: 1px solid var(--sb-border);
  align-items: center;
  padding: 0 1rem;
  z-index: 40;
}

.mb-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Bottom nav (mobile) ────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--sb-bg);
  border-top: 1px solid var(--sb-border);
  z-index: 40;
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  flex: 1;
  color: var(--sb-text);
  text-decoration: none;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.14s;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item:hover  { color: var(--text); }
.bn-item.active { color: var(--sb-active); }

/* ── Page content ───────────────────────────────────────────── */
.content {
  margin-left: var(--sb-w);
  flex: 1;
  min-height: 100vh;
  padding: 2rem 2.5rem;
  min-width: 0;
  max-width: 1200px;
}

/* ── Gate shell ─────────────────────────────────────────────── */
.gate-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.gate-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  background: #2C2A29;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.gate-bar-name { letter-spacing: -0.01em; }

.gate-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 1rem 2rem;
}

.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.gate-header { margin-bottom: 1.75rem; }

.gate-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.gate-sub {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.gate-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.gate-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  box-shadow: 0 2px 8px rgba(194,125,94,0.3);
}

/* ── Page header ────────────────────────────────────────────── */
.page-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

/* ── Dashboard ──────────────────────────────────────────────── */
.dash-hero {
  margin-bottom: 1.5rem;
}

.dash-greeting {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

.dash-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}

.dash-sub {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

/* ── Noticeboard ─────────────────────────────────────────────── */
.noticeboard {
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.nb-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.nb-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-dark);
}

.nb-post-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber-dark);
  background: none;
  border: 1.5px solid var(--amber-light);
  border-radius: var(--radius-xs);
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
  background: rgba(255,255,255,0.6);
  transition: background 0.14s, border-color 0.14s;
}
.nb-post-btn:hover { background: rgba(255,255,255,0.9); border-color: var(--amber); }

.nb-form {
  display: none;
  margin-bottom: 0.75rem;
}
.nb-form.open { display: block; }

.nb-form textarea {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--amber-light);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.8);
  min-height: 70px;
  resize: vertical;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.14s;
}
.nb-form textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: white;
}

.nb-form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.nb-list { display: flex; flex-direction: column; }

.nb-item-body {
  flex: 1;
  min-width: 0;
}

.nb-item-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
}

.nb-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 0.22rem;
  font-weight: 500;
}

.nb-del {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: color 0.13s, background 0.13s;
  flex-shrink: 0;
  line-height: 1;
}
.nb-del:hover { color: var(--red); background: var(--red-light); }

.nb-empty {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Pinned notice */
.nb-pinned {
  background: var(--amber-pale);
  border: 1.5px solid var(--amber-light);
  margin-bottom: 0.65rem;
}

.nb-pin-hd {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  margin-bottom: 0.6rem;
}

.nb-pinned-body {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
}

.nb-pinned-meta {
  font-size: 0.73rem;
  color: var(--amber-dark);
  margin-top: 0.4rem;
  font-weight: 500;
}

.nb-unpin-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--faint);
  font-size: 0.75rem;
  padding: 0.1rem 0.25rem;
  line-height: 1;
  border-radius: 3px;
  transition: color 0.12s;
}
.nb-unpin-btn:hover { color: var(--text); }

/* Notice item row */
.nb-notice-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nb-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.13s, border-color 0.13s;
}
.nb-item:hover { border-color: var(--border); box-shadow: var(--shadow); }

.nb-item-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.nb-action-btn {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.nb-action-btn:hover { color: var(--amber-dark); border-color: var(--amber); }

.nb-inline-pin {
  color: var(--amber-dark);
  font-size: 0.75rem;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: box-shadow 0.16s, transform 0.12s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
}
.stat-icon-green  { background: var(--green-light); color: var(--green); }
.stat-icon-blue   { background: var(--blue-light); color: var(--blue); }
.stat-icon-purple { background: var(--purple-light); color: var(--purple); }

.stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}

.stat-lbl {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: -0.25rem;
}

/* ── Land presence card ─────────────────────────────────────── */
/* ── Presence Hub — Who's on the Land ───────────────────────── */
.pres-hub {
  background: #fbfaf7;
  border-radius: 16px;
  border: 1px solid #e6e4de;
  border-top: 2.5px solid var(--green);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

.pres-hub-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--green-pale);
  border-bottom: 1px solid var(--green-light);
}

.pres-hub-hd-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
}

.pres-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livepulse 2s ease-in-out infinite;
}

.pres-hub-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a6b53;
  text-decoration: none;
  transition: color 0.12s;
}
.pres-hub-link:hover { color: #38523f; }

/* Section (today / next visit) */
.pres-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.25rem;
}
.pres-section-today {
  background: rgba(234, 245, 237, 0.45);
  border-bottom: 1px solid var(--border);
}
.pres-section-next {
  background: #fafaf8;
}

.pres-section-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.15rem;
}
.pres-label-today { color: #3d5c46; }
.pres-label-week  { color: var(--muted); }

.pres-today-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a6b53;
  flex-shrink: 0;
}

/* Individual person row */
.pres-person-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #eceae4;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color 0.13s;
}
.pres-section-today .pres-person-card {
  border-color: #d6e8da;
  background: #ffffff;
}
.pres-person-card:hover { border-color: #b8d4bf; }

.pres-person-empty {
  color: #8e9490;
  font-size: 0.83rem;
  font-style: italic;
  padding: 0.1rem 0;
}
.pres-empty-link {
  color: #4a6b53;
  font-style: normal;
  text-decoration: underline;
}

.pres-person-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

/* Avatar circle */
.pres-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef3f0;
  color: #4a6b53;
  border: 1px solid #dce5e0;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.pres-avatar-future {
  background: #f4f3ef;
  color: #737874;
  border-color: #e6e4de;
}

.pres-person-info { min-width: 0; }

.pres-person-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c1f1d;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pres-person-sub {
  font-size: 0.78rem;
  color: #5f6360;
  margin-top: 0.12rem;
  line-height: 1.4;
}
.pres-person-sub strong { color: #2d312e; font-weight: 600; }
.pres-group-tag { color: var(--faint); font-weight: 400; }

/* Travel badge */
.pres-travel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #f4f3ef;
  border: 1px solid #e6e4de;
  font-size: 0.75rem;
  font-weight: 500;
  color: #2d312e;
  white-space: nowrap;
  flex-shrink: 0;
}
.presence-row-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  white-space: nowrap;
  min-width: 72px;
  padding-top: 0.15rem;
}
.presence-today .presence-row-label { color: var(--green-dark); }
.presence-nobody { font-size: 0.86rem; color: var(--muted); padding-top: 0.1rem; }
.presence-dot-empty {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Dashboard pinned notice (full-width) ───────────────────── */
.dash-pinned-notice {
  background: var(--amber-pale);
  border: 1.5px solid var(--amber-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dash-pinned-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.dash-pinned-icon {
  color: var(--amber-dark);
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.dash-pinned-body {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
}

.dash-pinned-meta {
  font-size: 0.73rem;
  color: var(--amber-dark);
  margin-top: 0.3rem;
  font-weight: 500;
}

.dash-pinned-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dash-pinned-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber-dark);
  text-decoration: none;
  white-space: nowrap;
}
.dash-pinned-link:hover { text-decoration: underline; }

.dash-pinned-empty {
  background: var(--bg);
  border: 1.5px dashed var(--border);
}
.dash-pinned-icon-empty { color: var(--faint); }
.dash-pinned-placeholder {
  color: var(--faint);
  font-weight: 400;
  font-style: italic;
}

/* Task status pills in task health list */
.wip-status {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}
.wip-status-open      { background: var(--border-light); color: var(--muted); }
.wip-status-inprogress { background: #dbeafe; color: #1e40af; }
.wip-status-done      { background: var(--green-light); color: var(--green-dark); }

/* ── Gap alert ───────────────────────────────────────────────── */
.gap-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #713f12;
}
.gap-alert-icon {
  color: #a16207;
  flex-shrink: 0;
  padding-top: 0.1rem;
}
.gap-alert-body { line-height: 1.5; }
.gap-alert-cta { margin-left: 0.5rem; }
.gap-alert-cta a { color: #92400e; font-weight: 600; }
.gap-alert-cta a:hover { text-decoration: underline; }

/* ── Task health ─────────────────────────────────────────────── */
.task-health { margin-bottom: 0; }

.th-counts {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1rem;
}
.th-count {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  text-align: center;
}
.th-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border-light);
  flex-shrink: 0;
}
.th-num {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}
.th-num-inprog { color: #c2410c; }
.th-num-done   { color: var(--green-dark); }
.th-lbl {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.th-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.th-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}
.th-bar-done {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.th-bar-label {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Today on land banner ────────────────────────────────────── */
.today-banner {
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.today-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.today-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livepulse 2s ease-in-out infinite;
}

.today-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.today-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: white;
  border: 1px solid var(--green-light);
  border-radius: 999px;
  padding: 0.25rem 0.75rem 0.25rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-dark);
}

.today-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #0d9488);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Dashboard 2-col grid ───────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: start;
}
.dash-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* ── Sections ───────────────────────────────────────────────── */
.dash-section { margin-bottom: 0; }

.section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.section-more {
  font-size: 0.82rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.section-more:hover { text-decoration: underline; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.no-pad { padding: 0; overflow: hidden; }

/* ── Here chips ─────────────────────────────────────────────── */
.here-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.here-chip {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid rgba(22,163,74,0.15);
}

/* ── WIP rows ───────────────────────────────────────────────── */
.wip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}
.wip-row:last-child { border-bottom: none; }
.wip-row:hover { background: #f9f8f5; }

.wip-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.wip-title {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.wip-claimer {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Disc rows ──────────────────────────────────────────────── */
.disc-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.disc-row:last-child { border-bottom: none; }
.disc-row:hover { background: #f9f8f5; }

.disc-row-title { font-weight: 600; font-size: 0.92rem; }
.disc-row-meta  { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--muted); }

/* ── My Space dashboard ─────────────────────────────────────── */
.my-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.my-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.85rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}
.my-stat-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}
.my-stat-done { color: var(--green-dark); }
.my-stat-lbl  { font-size: 0.73rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

.my-task-list { display: flex; flex-direction: column; gap: 0.65rem; }
.my-task-card { margin-bottom: 0; }

.my-task-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.my-task-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.my-task-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}
.my-task-title:hover { color: var(--green); }
.my-task-meta { font-size: 0.76rem; color: var(--faint); margin-top: 0.3rem; }

.my-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 0;
}

.my-visit-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
}
.my-visit-row:last-child { border-bottom: none; }

.my-visit-dates {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.my-visit-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.my-visit-tag {
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--border-light);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
}
.my-visit-note {
  font-size: 0.76rem;
  color: var(--faint);
  font-style: italic;
}

/* ── Task controls (one row: view toggle + search + filters) ──── */
.task-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.task-filter-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

/* Search input with icon */
.tf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}
.tf-search-icon {
  position: absolute;
  left: 0.6rem;
  color: var(--faint);
  pointer-events: none;
  flex-shrink: 0;
}
.tf-search-input {
  width: 100%;
  height: 34px;
  padding: 0 0.65rem 0 2rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.tf-search-input:focus { border-color: var(--green); }

/* Compact select */
.tf-select {
  height: 34px;
  font-size: 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  padding: 0 1.4rem 0 0.5rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8a29e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  transition: border-color 0.15s;
  flex-shrink: 0;
  width: auto;
  max-width: 110px;
}
.tf-select:focus { border-color: var(--green); }
.tf-select.task-filter-active { color: var(--text); }

.task-filter-clear {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--faint);
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}
.task-filter-clear:hover { color: var(--text); background: var(--border-light); }
.task-filter-active { border-color: var(--green) !important; }

/* Mobile: stack search full-width, selects share a row */
@media (max-width: 640px) {
  .task-filter-inline { flex-wrap: wrap; }
  .tf-search-wrap     { width: 100%; }
  .tf-select          { flex: 1; }
  .table-status-filter { flex-wrap: wrap; }
}

/* due date + cost display */
.tc-due {
  font-size: 0.74rem;
  color: var(--faint);
  margin-top: 0.25rem;
}
.tc-due-overdue { color: var(--red); font-weight: 600; }
.tc-cost {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.tt-col-due  { width: 80px; }
.tt-col-cost { width: 80px; }

/* ── View toggle ────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: background 0.12s, color 0.12s;
}
.view-btn:last-child { border-right: none; }
.view-btn:hover  { background: var(--border-light); color: var(--text); }
.view-btn.active { background: var(--green); color: white; }

.table-status-filter {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.status-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: all 0.12s;
}
.status-pill:hover  { border-color: var(--green); color: var(--green); }
.status-pill.active { background: var(--text); color: white; border-color: var(--text); }

/* ── Task table ─────────────────────────────────────────────── */
.task-table-wrap { overflow-x: auto; }

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.task-table thead th {
  padding: 0.55rem 0.85rem;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
}
.task-table tbody tr { border-bottom: 1px solid var(--border-light); }
.task-table tbody tr:last-child { border-bottom: none; }
.task-table tbody tr:hover { background: #f9f8f5; }
.task-table td { padding: 0.6rem 0.85rem; vertical-align: middle; }

.tt-col-status { width: 90px; }
.tt-col-title  { min-width: 180px; }
.tt-col-badge  { width: 100px; }
.tt-col-who    { width: 110px; }
.tt-col-time   { width: 90px; white-space: nowrap; }
.tt-col-act    { width: 80px; }

.tt-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.tt-open   { background: #e0f2fe; color: #0369a1; }
.tt-inprog { background: var(--amber-light); color: var(--amber-dark); }
.tt-done   { background: var(--green-light); color: var(--green-dark); }

.task-tr-done .tt-title-link { text-decoration: line-through; color: var(--faint); }

.tt-title-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.tt-title-link { font-weight: 600; color: var(--text); text-decoration: none; font-size: 0.88rem; }
.tt-title-link:hover { color: var(--green); text-decoration: underline; }
.tt-desc-preview { font-size: 0.75rem; color: var(--faint); }

.tt-who { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; }
.tt-unassigned { color: var(--faint); }
.tt-time { font-size: 0.76rem; color: var(--faint); }
.tt-act  { white-space: nowrap; }

/* ── Manage meta panel ──────────────────────────────────────── */
.manage-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.manage-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.meta-list { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.5rem; }
.meta-list-row { display: flex; align-items: center; gap: 0.5rem; }
.meta-inactive { opacity: 0.4; }
.meta-removed  { font-size: 0.72rem; color: var(--faint); font-style: italic; }

/* New label color classes */
.label-green  { background: #dcfce7; color: #166534; }
.label-orange { background: #ffedd5; color: #9a3412; }
.label-gray   { background: #f1f5f9; color: #475569; }

/* New priority color classes */
.priority-critical { background: #fee2e2; color: #991b1b; }
.priority-minimal  { background: #f8fafc; color: #94a3b8; border: 1px solid var(--border); }

/* ── Kanban board ───────────────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}
.kanban-4 {
  grid-template-columns: repeat(4, 1fr);
}

.kb-col {
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-height: 200px;
}

.kb-col-done { opacity: 0.8; }

.kb-col-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.65rem;
}

.kb-col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kb-dot-open      { background: #f59e0b; }
.kb-dot-progress  { background: #3b82f6; }
.kb-dot-dependent { background: #c084fc; }
.kb-dot-done      { background: var(--green); }

.kb-col-closed { opacity: 0.75; }

.kb-col-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  flex: 1;
}

.kb-col-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--border);
  color: var(--faint);
  border-radius: 999px;
  padding: 0.06rem 0.45rem;
}

.kb-empty {
  font-size: 0.85rem;
  color: var(--faint);
  text-align: center;
  padding: 2rem 0;
}

/* ── Task cards ─────────────────────────────────────────────── */
.task-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  border-left: 3px solid var(--border);
  transition: box-shadow 0.14s, transform 0.12s;
}
.task-card:last-child { margin-bottom: 0; }
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.task-prio-high   { border-left-color: #f87171; }
.task-prio-medium { border-left-color: #fbbf24; }
.task-prio-low    { border-left-color: #94a3b8; }

.task-card-done { box-shadow: none; }
.task-card-done:hover { transform: none; box-shadow: none; }

.tc-top    { margin-bottom: 0.5rem; }
.tc-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.tc-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.tc-title-done {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 500;
}

.tc-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.tc-claimer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 0.55rem;
}

.claimer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: livepulse 2s ease-in-out infinite;
}

.tc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-light);
}

.tc-author {
  font-size: 0.74rem;
  color: var(--faint);
  font-weight: 500;
}

.tc-actions { display: flex; gap: 0.3rem; }

/* In-progress and dependent card accent */
.tc-inprog    { border-left-color: #3b82f6; }
.tc-dependent { border-left-color: #c084fc; }

/* Assignee row */
.tc-assignee-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  min-height: 1.6rem;
}

/* Avatar stack */
.tc-avatar-stack {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  margin-right: auto;
}
.tc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border: 2px solid var(--surface);
  margin-left: -0.4rem;
  cursor: default;
  flex-shrink: 0;
}
.tc-avatar:first-child { margin-left: 0; }
.tc-avatar-more {
  background: var(--border);
  color: var(--muted);
  font-size: 0.6rem;
}
.tc-avatar-done { background: var(--muted); }

.tc-assign-btn {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
  padding: 0.18rem 0.5rem;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.tc-assign-btn:hover { border-color: var(--green); color: var(--green-dark); }

.tc-unassign-btn {
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.12s;
  white-space: nowrap;
}
.tc-unassign-btn:hover { color: var(--red); }

/* Status move row */
.tc-status-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-light);
}

.tc-move-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-right: 0.1rem;
  white-space: nowrap;
}

.tc-status-btn {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.2rem 0.52rem;
  cursor: pointer;
  background: var(--border-light);
  color: var(--muted);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.tc-status-btn-open:hover      { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.tc-status-btn-progress:hover  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tc-status-btn-dependent:hover { background: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }
.tc-status-btn-close:hover     { background: var(--border-light); color: var(--red); border-color: var(--red); }

/* Table move group */
.tt-move-group { display: flex; gap: 0.2rem; flex-wrap: wrap; }
.tt-status.tt-dependent { background: #f3e8ff; color: #7e22ce; }

/* ── Modal overlay ──────────────────────────────────────────── */
body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s ease;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-wide { max-width: 680px; }

.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-hd h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--faint);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-xs);
  line-height: 1;
  transition: color 0.12s, background 0.12s;
}
.modal-close:hover { color: var(--text); background: var(--border-light); }

.modal-body {
  padding: 1.25rem;
}
.modal-body .form-actions { margin-top: 1.1rem; }

/* Mobile: bottom sheet */
@media (max-width: 620px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
    transform: translateY(100%);
  }
  .modal-overlay.open .modal { transform: translateY(0); }
}

/* ── Add task panel ─────────────────────────────────────────── */
.add-task-panel {
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  transition: max-height 0.28s ease, opacity 0.2s, margin-bottom 0.2s;
  padding: 0 var(--gap);
  border: none;
  box-shadow: none;
}

.add-task-panel.open {
  max-height: 900px;
  opacity: 1;
  margin-bottom: var(--gap);
  padding: var(--gap);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* ── Calendar ───────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cal-month-label {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 165px;
  text-align: center;
  color: var(--text);
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  transition: all 0.13s;
  flex-shrink: 0;
}
.cal-nav-btn:hover { background: var(--green-pale); border-color: var(--green); color: var(--green); }
.cal-nav-btn-disabled { opacity: 0.25; pointer-events: none; cursor: default; }

.cal-today-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: all 0.13s;
}
.cal-today-btn:hover { border-color: var(--green); color: var(--green); }

.cal-card { margin-bottom: 0.75rem; }

.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border-light);
  background: var(--border-light);
}

.cal-dow {
  text-align: center;
  padding: 0.6rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-day {
  min-height: 96px;
  padding: 0.5rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
  position: relative;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover         { background: #f9f8f5; }
.cal-dim               { background: var(--border-light); }
.cal-dim .cal-day-num  { color: var(--faint); }
.cal-dim:hover         { background: var(--border-light); }

.cal-today { background: var(--green-pale); }
.cal-today:hover { background: #e6f9ed; }

.cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.4rem;
  line-height: 1;
}

.cal-today .cal-day-num {
  background: var(--green);
  color: white;
  font-weight: 700;
}

.cal-people {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.cal-person {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: default;
  transition: transform 0.12s;
}
.cal-person:hover { transform: scale(1.25); z-index: 1; position: relative; }

.cal-extra {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  padding-left: 1px;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.1rem 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-group { color: var(--faint); font-weight: 400; font-size: 0.78rem; }

.my-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
}
.my-entry-row:last-child { border-bottom: none; }

.my-entry-dates  { display: flex; flex-direction: column; gap: 0.15rem; }
.my-entry-range  { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.my-entry-note   { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.my-entry-travel { font-size: 0.78rem; color: var(--muted); }
.my-entry-family { font-size: 0.78rem; color: var(--muted); }

.form-check-row { margin-bottom: 0.25rem; }
.check-label    { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.check-label input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--accent); cursor: pointer; }

/* ── Schedule page ──────────────────────────────────────────── */
.sched-section { margin-bottom: 1.75rem; }

.sched-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-link { color: var(--green); text-decoration: none; font-weight: 600; }
.inline-link:hover { text-decoration: underline; }

.sched-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
}
.sched-row:last-child { border-bottom: none; }

.sched-row-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sched-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #0d9488);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sched-name  { font-weight: 600; font-size: 0.92rem; display: block; }
.sched-note  { font-size: 0.76rem; color: var(--muted); font-style: italic; display: block; margin-top: 0.1rem; }
.sched-dates { font-size: 0.84rem; color: var(--muted); font-weight: 500; white-space: nowrap; flex-shrink: 0; }

.sched-event-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.sched-event-row:last-child { border-bottom: none; }
.sched-event-row:hover { background: #f9f8f5; }

.sched-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.sched-event-body  { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.sched-event-title { font-weight: 600; font-size: 0.92rem; }
.sched-event-meta  { font-size: 0.78rem; color: var(--muted); }

.sched-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem 0.75rem 1.3rem;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid var(--border);
  transition: background 0.12s;
}
.sched-task-row:last-child { border-bottom: none; }
.sched-task-row:hover { background: #f9f8f5; }
.sched-task-row.task-prio-high   { border-left-color: #f87171; }
.sched-task-row.task-prio-medium { border-left-color: #fbbf24; }
.sched-task-row.task-prio-low    { border-left-color: #94a3b8; }

.sched-task-left  { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.sched-task-title { font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Availability timeline ──────────────────────────────────── */
.atl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.atl-row {
  display: grid;
  grid-template-columns: 9rem repeat(7, 1fr);
  align-items: center;
  min-height: 2.9rem;
  gap: 4px;
  padding: 0 0.9rem;
}

.atl-header {
  padding-top: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}

.atl-row:not(.atl-header) {
  border-bottom: 1px solid var(--border-light);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.atl-row:not(.atl-header):last-child { border-bottom: none; }

.atl-day   { display: flex; flex-direction: column; align-items: center; gap: 0.12rem; }
.atl-dname {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.atl-dnum {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.atl-today .atl-dnum { background: var(--green); color: white; }

.atl-person-col { display: flex; flex-direction: column; gap: 0.1rem; padding-right: 0.5rem; min-width: 0; }

.atl-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atl-note { font-size: 0.72rem; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.atl-cell {
  height: 1.8rem;
  border-radius: 4px;
  background: var(--border-light);
}

.atl-cell.atl-here {
  background: var(--pc, var(--green));
  opacity: 0.82;
}

/* ── Person list (availability) ─────────────────────────────── */
.person-list { list-style: none; display: flex; flex-direction: column; }
.person-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-light); }
.person-item:last-child { border-bottom: none; }
.person-item .dates { color: var(--muted); font-size: 0.86rem; font-weight: 500; }
.person-item .note  { color: var(--faint); font-size: 0.8rem; font-style: italic; }

/* ── People page ─────────────────────────────────────────────── */
.people-section { margin-bottom: 2rem; }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.person-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: box-shadow 0.15s, transform 0.12s;
}
.person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.person-card-on-land {
  border-color: rgba(22,163,74,0.3);
  background: linear-gradient(135deg, #ffffff 0%, var(--green-pale) 100%);
}

.person-card-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.person-info { min-width: 0; }
.person-name { font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.person-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.12rem;
}

.status-here {
  color: var(--green-dark);
}

.status-coming {
  color: var(--sky);
}

.status-away {
  color: var(--faint);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-here    { background: #22c55e; animation: livepulse 2s ease-in-out infinite; }
.status-dot-coming  { background: var(--sky); }
.status-dot-away    { background: var(--faint); }

.person-note {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
}

.person-dates {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

/* ── Discussion list ────────────────────────────────────────── */
/* ── Discussion toolbar & search ────────────────────────────── */
.disc-toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }

.disc-search-form { display: flex; align-items: center; gap: 0.5rem; flex: 1; }

.disc-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.disc-search-icon {
  position: absolute;
  left: 0.7rem;
  color: var(--faint);
  pointer-events: none;
  flex-shrink: 0;
}
.disc-search-input {
  width: 100%;
  padding: 0.4rem 2.2rem 0.4rem 2.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.86rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}
.disc-search-input:focus { outline: none; border-color: var(--green); }
.disc-search-clear {
  position: absolute;
  right: 0.6rem;
  color: var(--faint);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1;
}
.disc-search-clear:hover { color: var(--text); }

/* ── Thread list — gap-separated cards ──────────────────────── */
.disc-thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.disc-thread-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.13s, border-color 0.13s;
}
.disc-thread-row:hover {
  border-color: var(--green-light);
  box-shadow: var(--shadow);
}

.disc-thread-main { flex: 1; min-width: 0; }

.disc-thread-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.disc-thread-title {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.disc-thread-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--faint);
}
.disc-thread-author { font-weight: 600; color: var(--muted); }

.disc-thread-count {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
}
.pagination-label { font-size: 0.82rem; color: var(--muted); }

/* ── Discussion thread ──────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--green); }

.thread-hd    { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.55rem; }
.thread-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; flex: 1; line-height: 1.3; color: var(--text); }
.thread-meta  { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-light); }
.thread-body  { font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; color: var(--text-2); }
.thread-del-btn { color: var(--muted); }
.thread-del-btn:hover { color: #dc2626; border-color: #dc2626; }

.archived-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #854d0e;
  margin-bottom: 1rem;
}
.thread-op-archived { opacity: 0.8; }

.archived-reply-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--faint);
  font-style: italic;
  padding: 0.9rem 1.1rem;
  margin-top: 0.25rem;
}

.reply-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #0d9488);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Section divider: "N Replies" / "Comments" header */
.replies-hd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}
.replies-hd::before,
.replies-hd::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.replies-hd-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.replies-hd-page {
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
}
.replies-empty {
  font-size: 0.85rem;
  color: var(--faint);
  font-style: italic;
  margin-bottom: 1rem;
}

.reply-list { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 0.75rem; }
.task-comment-list { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 0.75rem; }
.reply-card { padding: 0.95rem 1.1rem; }
.reply-hd   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.reply-meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.reply-time { font-size: 0.75rem; color: var(--faint); }
.reply-body { font-size: 0.9rem; line-height: 1.65; white-space: pre-wrap; color: var(--text-2); }

.reply-pager {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  margin-bottom: 0.25rem;
}

.reply-form-card { margin-top: 0.25rem; }

/* ── Category management ────────────────────────────────────── */
.cat-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }
.cat-list-row { display: flex; align-items: center; gap: 0.6rem; }
.cat-inactive { opacity: 0.45; }
.cat-removed-label { font-size: 0.72rem; color: var(--faint); font-style: italic; }

/* Color swatches for category picker */
.color-swatches { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.swatch-label { position: relative; cursor: pointer; }
.swatch-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: border-color 0.15s, transform 0.12s;
}
.swatch-label input[type="radio"]:checked + .swatch {
  border-color: var(--text);
  transform: scale(1.15);
}
.swatch.place-general { background: #d1d5db; }
.swatch.place-garden  { background: #86efac; }
.swatch.place-house   { background: #93c5fd; }
.swatch.place-shed    { background: #fcd34d; }
.swatch.place-tools   { background: #fdba74; }
.swatch.place-events  { background: #c4b5fd; }
.swatch.place-teal    { background: #5eead4; }
.swatch.place-rose    { background: #fda4af; }

/* ── disc-sep ───────────────────────────────────────────────── */
.disc-sep { color: var(--border); }

/* ── Place tabs ─────────────────────────────────────────────── */
.place-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }

.place-tab {
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: all 0.13s;
}
.place-tab:hover  { border-color: var(--green); color: var(--green); }
.place-tab.active { background: var(--green); color: white; border-color: var(--green); }

/* ── Place tags ─────────────────────────────────────────────── */
.place-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.place-general { background: #f3f4f6; color: #6b7280; }
.place-garden  { background: var(--green-light); color: var(--green-dark); }
.place-house   { background: var(--blue-light); color: #1d4ed8; }
.place-shed    { background: var(--amber-light); color: var(--amber-dark); }
.place-tools   { background: #ffedd5; color: #c2410c; }
.place-events  { background: var(--purple-light); color: #6d28d9; }
.place-teal    { background: #ccfbf1; color: #0f766e; }
.place-rose    { background: #ffe4e6; color: #be123c; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.label-task        { background: #e0f2fe; color: #0369a1; }
.label-idea        { background: var(--purple-light); color: #6b21a8; }
.label-improvement { background: #ccfbf1; color: #0f766e; }
.label-bug         { background: var(--red-light); color: #b91c1c; }
.label-question    { background: #fefce8; color: #854d0e; }

.priority-high   { background: var(--red-light); color: #b91c1c; }
.priority-medium { background: #fff7ed; color: #c2410c; }
.priority-low    { background: #f1f5f9; color: #64748b; }

/* ── Section badge ──────────────────────────────────────────── */
.section-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  min-height: 44px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: inherit;
  transition: all 0.14s;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: none; opacity: 0.85; }

.btn-primary { background: var(--amber); color: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-primary:hover { background: var(--amber-dark); box-shadow: 0 4px 14px rgba(194,125,94,0.3); }

.btn-secondary { background: var(--surface); color: var(--green-dark); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--green-pale); border-color: var(--green); }

.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text-2); }

.btn-amber { background: var(--amber); color: white; }
.btn-amber:hover { background: var(--amber-dark); box-shadow: 0 4px 14px rgba(217,119,6,0.3); }

.btn-sm  { padding: 0.48rem 0.95rem; font-size: 0.86rem; min-height: 38px; }
.btn-xs  { padding: 0.32rem 0.7rem; font-size: 0.8rem; min-height: 30px; border-radius: var(--radius-xs); }

/* ── Button loading state ───────────────────────────────────── */
.btn-loading { opacity: 0.75; cursor: not-allowed; transform: none !important; }
.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1c1f1d;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 1rem 0.65rem 1.1rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: 90vw;
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-left: 3px solid #22c55e; }
.toast-error   { border-left: 3px solid #ef4444; background: #1a0a0a; }
.toast button  {
  background: none; border: none; color: rgba(255,255,255,0.55);
  cursor: pointer; font-size: 0.85rem; padding: 0 0.15rem; line-height: 1;
}
.toast button:hover { color: #fff; }

@media (max-width: 768px) {
  .toast { bottom: calc(62px + 1rem); font-size: 0.84rem; }
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-heading { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.form-group   { margin-bottom: 0.9rem; }
.form-group-sm { flex: 0 0 auto; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-inline  { display: flex; align-items: flex-end; gap: 0.75rem; }
.btn-post     { white-space: nowrap; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.84rem;
  color: var(--text-2);
}
.label-opt { font-weight: 400; color: var(--faint); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.95rem;
  background: var(--surface);
  min-height: 44px;
  color: var(--text);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
textarea { min-height: 80px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8a29e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ── Utility ────────────────────────────────────────────────── */
.error-msg {
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.9rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-xs);
}
.muted { color: var(--muted); font-size: 0.92rem; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state p { font-size: 0.92rem; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 1.5rem 0;
}

/* ── Task detail ─────────────────────────────────────────────── */
.task-detail { display: flex; flex-direction: column; gap: 1rem; }

.td-card { margin-bottom: 0; }

.td-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.td-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }

.td-status-badge { font-size: 0.72rem; }
.td-status-open       { background: #fef9c3; color: #854d0e; }
.td-status-inprogress { background: var(--blue-light); color: #1e40af; }
.td-status-dependent  { background: #f3e8ff; color: #7e22ce; }
.td-status-done,
.td-status-closed     { background: var(--green-light); color: var(--green-dark); }

/* Status controls row on detail page */
.td-status-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

/* Archive row */
.td-archive-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}
.td-archive-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--faint);
  cursor: pointer;
  font-family: inherit;
  padding: 0.2rem 0.4rem;
  transition: color 0.12s;
}
.td-archive-btn:hover { color: var(--red); }

/* Activity feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
}

.activity-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.65rem 0.85rem;
  position: relative;
}
.activity-item + .activity-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.85rem;
  right: 0.85rem;
  height: 1px;
  background: var(--border-light);
}
.activity-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.activity-item:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.activity-item:only-child {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.activity-item:first-child:not(:only-child):nth-child(n+2) {
  border-top: none;
}

/* History event items */
.activity-event { background: var(--bg); }

.activity-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.activity-icon-claimed    { background: #dcfce7; color: #15803d; }
.activity-icon-unclaimed  { background: #fee2e2; color: #dc2626; }
.activity-icon-status_changed { background: #dbeafe; color: #1d4ed8; }

.activity-body {
  flex: 1;
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem;
  padding-top: 0.25rem;
}
.activity-actor { font-weight: 700; color: var(--text); }
.activity-text  { }
.activity-detail { font-weight: 600; color: var(--text); }
.activity-time {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--faint);
  white-space: nowrap;
}

/* Comment items inside activity feed */
.activity-comment { background: var(--surface); }

.td-actions-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.td-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.td-title-done { text-decoration: line-through; color: var(--muted); font-weight: 600; }

.td-desc {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.td-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--muted);
}

.td-meta-item { display: flex; align-items: center; gap: 0.35rem; }
.td-claimer   { color: var(--green-dark); font-weight: 500; }
.td-date      { color: var(--faint); }

/* Task detail multi-assignee */
.td-assignees {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}
.td-assignees-label { color: var(--muted); font-size: 0.82rem; }
.td-assignee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.td-assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--faint-bg, #f5f5f4);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.18rem 0.5rem 0.18rem 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
}
.td-assignee-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}
.td-assignee-name { line-height: 1; }
.td-assignee-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--faint);
  font-size: 0.65rem;
  padding: 0 0.1rem;
  line-height: 1;
  font-family: inherit;
  transition: color 0.12s;
}
.td-assignee-remove:hover { color: var(--red); }

/* Task title link */
.tc-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.3rem;
}
.tc-title-link:hover { color: var(--green); text-decoration: underline; }

/* ── Task comments ───────────────────────────────────────────── */
/* Activity log: compact history events between task card and comments */
.td-activity-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.6rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}
.td-activity-log .activity-item {
  padding: 0.35rem 0;
  border: none;
  background: none;
}
.td-activity-log .activity-item + .activity-item {
  border-top: 1px solid var(--border-light);
}
.td-activity-log .activity-item::before { display: none; }

.td-comments { display: flex; flex-direction: column; gap: 0.75rem; }

.comment-list { display: flex; flex-direction: column; gap: 0; }

.comment-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: 0;
}
.comment-item:first-child { border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); border-bottom-color: var(--border-light); }
.comment-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); border: 1px solid var(--border); border-top: none; box-shadow: var(--shadow-sm); }
.comment-item:only-child  { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.comment-author { font-size: 0.85rem; color: var(--text); }
.comment-time   { font-size: 0.75rem; color: var(--faint); }

.comment-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-wrap;
}

.comment-form-card { margin-bottom: 0; }

/* ── Brainstorm list ─────────────────────────────────────────── */
.bs-list { display: flex; flex-direction: column; gap: 0.7rem; }

.bs-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.12s;
}
.bs-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.bs-card-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bs-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livepulse 2s ease-in-out infinite;
}
.bs-status-dot.bs-status-closed { background: var(--faint); animation: none; }

.bs-status-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.bs-idea-count {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--border-light);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.bs-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.bs-card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.55rem;
}

.bs-card-meta { font-size: 0.76rem; color: var(--faint); display: flex; gap: 0.35rem; align-items: center; }

/* ── Brainstorm detail ───────────────────────────────────────── */
.bs-detail { display: flex; flex-direction: column; gap: 1.25rem; }

.bs-prompt-card { margin-bottom: 0; }

.bs-prompt-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.bs-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.bs-status-pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: livepulse 2s ease-in-out infinite;
}
.bs-status-pill-closed {
  color: var(--muted);
  background: var(--border-light);
}
.bs-status-pill-closed::before {
  background: var(--faint);
  animation: none;
}

.bs-prompt-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.bs-prompt-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.bs-prompt-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--faint);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.bs-add-idea { margin-bottom: 0; }

/* ── Ideas grid ──────────────────────────────────────────────── */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.idea-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.14s, transform 0.12s;
}
.idea-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.idea-card-voted {
  border-color: rgba(22,163,74,0.3);
  background: linear-gradient(135deg, #ffffff 0%, var(--green-pale) 100%);
}

.idea-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}

.idea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
}

.idea-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.idea-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idea-author {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idea-time {
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.13s;
  min-height: 32px;
}
.vote-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-pale); }

.vote-btn-active {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green-dark);
}
.vote-btn-active:hover { background: var(--green-light); opacity: 0.85; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 960px) and (min-width: 769px) {
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .content   { padding: 1.75rem 2rem; }
}

@media (max-width: 768px) {
  .sidebar    { display: none; }
  .mobile-bar { display: flex; }
  .bottom-nav { display: flex; }
  .content {
    margin-left: 0;
    padding: 1rem;
    padding-top: calc(54px + 1rem);
    padding-bottom: calc(62px + 1rem);
    max-width: 100%;
  }
  .dash-grid     { grid-template-columns: 1fr; gap: 0; }
  .dash-col      { gap: 1rem; margin-bottom: 1rem; }
  .kanban, .kanban-4 { grid-template-columns: 1fr; }
  .manage-cols   { grid-template-columns: 1fr; }
  .my-stat-row   { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .my-stat-num   { font-size: 1.55rem; }
  .th-num        { font-size: 1.7rem; }
  .tt-col-badge, .tt-col-who, .tt-col-time { display: none; }
  .stat-row      { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-num      { font-size: 1.65rem; }
  .stat-lbl      { font-size: 0.7rem; }
  .form-row      { grid-template-columns: 1fr; }
  .form-inline   { flex-direction: column; align-items: stretch; }
  .atl-row       { grid-template-columns: 6rem repeat(7, 1fr); }
  .cal-day       { min-height: 64px; padding: 0.3rem; }
  .cal-person    { width: 18px; height: 18px; font-size: 0.55rem; }
  .cal-month-label { min-width: 130px; font-size: 1.05rem; }
  .dash-greeting { font-size: 1.45rem; }
  .people-grid   { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .ideas-grid    { grid-template-columns: 1fr; }
  .td-hd         { flex-direction: column; }
  .td-title      { font-size: 1.2rem; }
  .bn-item       { font-size: 0.63rem; }
  .bn-item svg   { width: 21px; height: 21px; }
}

@media (max-width: 480px) {
  .stat-row          { grid-template-columns: repeat(3, 1fr); }
  .stat-icon-wrap    { display: none; }
  .stat-num          { font-size: 1.55rem; }
  .today-banner      { gap: 0.6rem; }
  .ideas-grid        { grid-template-columns: 1fr; }
  .brainstorm-canvas { overflow-x: auto; padding: 1rem; min-height: unset; }
  .canvas-notes-row  { flex-wrap: nowrap; gap: 0.75rem; padding-bottom: 0.5rem; }
  .sticky-note       { transform: none !important; width: 150px; min-height: 150px; flex-shrink: 0; }
  .sticky-add-tile   { width: 150px; min-height: 150px; flex-shrink: 0; }
}

/* ── Greenhouse idea board ───────────────────────────────────── */

/* Sub-heading description text */
.brainstorm-desc {
  font-size: 0.87rem;
  color: #6E6A68;
  margin-top: 0.2rem;
}

/* One big canvas — matches reference .canvas-area exactly */
.brainstorm-canvas {
  background: #F4F0EB;
  border-radius: 12px;
  min-height: 65vh;
  padding: 1.5rem;
  border: 1px dashed #6E6A68;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Week section inside canvas */
.canvas-week-section { display: flex; flex-direction: column; gap: 1rem; }

.canvas-week-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6E6A68;
}
.canvas-week-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(110,106,104,0.25);
}
.canvas-week-count {
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255,255,255,0.55);
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  color: #6E6A68;
  flex-shrink: 0;
}

.canvas-notes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

/* Sticky note — matches reference .sticky-note exactly */
.sticky-note {
  width: 160px;
  min-height: 160px;
  padding: 1rem;
  background: #FFF9E6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  transform: rotate(-1deg);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  word-break: break-word;
  position: relative;
}
/* Exact reference color/rotation pattern */
.sticky-note:nth-child(even) { background: #F6ECE7; transform: rotate(1.5deg); }
.sticky-note:nth-child(3n)   { background: #EEF2ED; transform: rotate(-2deg); }
.sticky-note:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  box-shadow: 0 8px 22px rgba(44,42,41,0.14);
  z-index: 2;
}

.sticky-note-moved { opacity: 0.55; }
.sticky-note-discarded {
  background: rgba(240,237,233,0.8) !important;
  transform: none !important;
  opacity: 0.45;
  box-shadow: none;
}

/* Body — top ~70%, like reference textarea */
.sticky-note-body {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #2C2A29;
  padding-bottom: 0.6rem;
  min-height: 72px;
}

/* Footer — replaces reference's single delete btn row */
.sticky-note-foot {
  border-top: 1px solid rgba(44,42,41,0.08);
  padding-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sticky-note-actions { display: flex; gap: 0.22rem; flex-wrap: wrap; }

.sticky-note-btn {
  font-size: 0.7rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  padding: 0.2rem 0.45rem;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  background: rgba(255,255,255,0.7);
  color: #4e4b49;
  line-height: 1.5;
}
.sticky-note-btn:hover           { background: rgba(255,255,255,0.95); }
.sticky-note-btn-discuss         { color: #7A8F75; }
.sticky-note-btn-discuss:hover   { background: #EEF2ED; color: #4a6145; }
.sticky-note-btn-letgo:hover     { background: #F6ECE7; color: #C27D5E; }
.sticky-note-btn-restore         { color: #b45309; }
.sticky-note-btn-restore:hover   { background: #FFF9E6; color: #92400e; }

.sticky-note-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.sticky-note-pill-moved          { color: #7A8F75; }
.sticky-note-pill-moved a        { color: inherit; text-decoration: none; }
.sticky-note-pill-moved a:hover  { text-decoration: underline; }
.sticky-note-pill-discarded      { color: #6E6A68; font-style: italic; }

/* Author + date — bottom of each note */
.sticky-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.2rem;
}
.sticky-note-author {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2C2A29;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-note-date {
  font-size: 0.7rem;
  color: #5e5b59;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Add tile — same 160×160 as a sticky note */
.sticky-add-tile {
  width: 160px;
  min-height: 160px;
  border: 2px dashed rgba(110,106,104,0.35);
  border-radius: 4px;
  background: rgba(255,255,255,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6E6A68;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.sticky-add-tile:hover {
  border-color: #C27D5E;
  color: #C27D5E;
  background: rgba(246,236,231,0.45);
}
