:root {
  --bg: #08112b;
  --panel: #0b1533;
  --panel-2: #101d45;
  --line: rgba(255,255,255,.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(96,165,250,.20), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}
a { color: inherit; text-decoration: none; }
.ct-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ct-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(8,17,43,.86); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.ct-brand { font-weight: 800; letter-spacing: .02em; font-size: 20px; }
.ct-brand small { color: var(--muted); font-weight: 500; margin-left: 8px; }
.ct-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-main { width: min(1180px, calc(100% - 32px)); margin: 22px auto 48px; }
.ct-card { background: rgba(11,21,51,.88); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 18px 40px rgba(0,0,0,.20); }
.ct-grid { display: grid; gap: 16px; }
.ct-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ct-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ct-page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; }
p { color: var(--muted); line-height: 1.7; }
.ct-muted { color: var(--muted); }
.ct-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted); font-size: 12px; }
.ct-btn, input[type="submit"], button.ct-btn {
  appearance: none; border: 1px solid rgba(96,165,250,.42); background: rgba(96,165,250,.16); color: var(--text);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.ct-btn:hover, input[type="submit"]:hover { filter: brightness(1.12); }
.ct-btn.secondary { border-color: var(--line); background: rgba(255,255,255,.06); color: var(--text); }
.ct-btn.danger { border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.14); }
.ct-btn.small { padding: 6px 9px; font-size: 13px; }
.ct-inline-form { display: inline; }
.ct-table { width: 100%; border-collapse: collapse; }
.ct-table th, .ct-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.ct-table th { color: var(--muted); font-size: 12px; font-weight: 700; }
.ct-form { display: grid; gap: 14px; }
.ct-field { display: grid; gap: 6px; }
.ct-field label { color: var(--muted); font-weight: 700; font-size: 13px; }
.ct-field input, .ct-field textarea, .ct-field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text); padding: 10px 12px;
}
.ct-field textarea { min-height: 110px; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-flash { margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.ct-flash.alert { border-color: rgba(251,113,133,.55); }
.ct-errors { border: 1px solid rgba(251,113,133,.55); background: rgba(251,113,133,.10); padding: 12px; border-radius: 12px; }
.ct-progress { width: 100%; height: 10px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.ct-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); }
.ct-task-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 8px 0; background: rgba(255,255,255,.04); }
.ct-task-row.done { opacity: .68; }
.ct-task-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ct-subtasks { margin-left: 22px; }
.ct-stat { display: grid; gap: 4px; }
.ct-stat strong { font-size: 28px; }
.ct-bad { color: var(--danger); }
.ct-good { color: var(--good); }
@media (max-width: 760px) {
  .ct-topbar { align-items: flex-start; flex-direction: column; }
  .ct-grid.cols-2, .ct-grid.cols-3 { grid-template-columns: 1fr; }
  .ct-page-title { flex-direction: column; }
  .ct-main { width: min(100% - 20px, 1180px); }
}

/* Select dropdown readability fix */
.ct-field select {
  background-color: #17213f;
  color: var(--text);
  color-scheme: dark;
}

.ct-field select option,
.ct-field select optgroup {
  background-color: #0f172a;
  color: #f8fafc;
}

.ct-field select:focus {
  outline: none;
  border-color: rgba(96,165,250,.75);
  box-shadow: 0 0 0 3px rgba(96,165,250,.18);
}

/* Help text and advanced integration fields */
.ct-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ct-advanced {
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.035);
}

.ct-advanced summary {
  cursor: pointer;
  color: #cbd5e1;
  font-weight: 700;
}

.ct-advanced-body {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

/* AI-first dashboard and candidate review */
.ct-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(96,165,250,.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(52,211,153,.08)), rgba(11,21,51,.82);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.ct-hero h1 { font-size: clamp(28px, 4vw, 44px); margin-top: 10px; }
.ct-hero p { font-size: 16px; }
.ct-hero-card { background: rgba(8,17,43,.55); }
.ct-btn-hero { font-size: 16px; padding: 12px 16px; }
.ct-large-textarea { min-height: 260px !important; font-size: 15px; line-height: 1.75; }
.ct-sample {
  white-space: pre-wrap;
  margin: 0;
  color: #dbeafe;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  line-height: 1.65;
}
.ct-list { color: var(--muted); line-height: 1.8; }
.ct-candidate-list { display: grid; gap: 16px; }
.ct-candidate-card {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,.04);
}
.ct-candidate-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ct-check-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.ct-child-recommendation-card .ct-check-label { width: 100%; align-items: flex-start; line-height: 1.6; }
.ct-child-recommendation-title { overflow-wrap: anywhere; }
.ct-table.compact th, .ct-table.compact td { padding: 6px 8px; }
@media (max-width: 760px) { .ct-hero { grid-template-columns: 1fr; } }

/* Product readiness: public pages, settings, and admin */
.ct-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ct-footer a { color: #cbd5e1; }
.ct-footer a:hover { color: var(--text); }

.ct-legal {
  max-width: 920px;
  margin: 0 auto;
}

.ct-legal h2 {
  margin-top: 24px;
  color: #dbeafe;
}

.ct-legal ol,
.ct-legal ul {
  color: var(--muted);
}

.ct-policy-check {
  align-items: flex-start;
  line-height: 1.6;
  color: #dbeafe;
}

.ct-policy-check input {
  width: auto;
  margin-top: 4px;
}

.ct-admin-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .45fr) minmax(160px, .45fr) auto;
  gap: 12px;
  align-items: end;
}

.ct-action-stack {
  display: grid;
  justify-content: start;
}

.ct-pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #dbeafe;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.ct-pill.good {
  border-color: rgba(52,211,153,.4);
  color: #bbf7d0;
  background: rgba(52,211,153,.1);
}

.ct-pill.warning {
  border-color: rgba(251,191,36,.4);
  color: #fde68a;
  background: rgba(251,191,36,.1);
}

.ct-pill.danger {
  border-color: rgba(251,113,133,.45);
  color: #fecdd3;
  background: rgba(251,113,133,.1);
}

.ct-ai-privacy-note {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ct-ai-privacy-note a {
  color: #dbeafe;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .ct-admin-filter { grid-template-columns: 1fr; }
  .ct-footer { width: min(100% - 20px, 1180px); }
}

/* ===== AI Chat Drawer Fix ===== */
.ct-ai-drawer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.ct-ai-toggle {
  display: none;
}

.ct-ai-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-weight: 700;
}

.ct-ai-tab:hover {
  background: #1d4ed8;
}

.ct-ai-tab-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 12px;
}

.ct-ai-panel {
  position: fixed;
  right: 24px;
  bottom: 84px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  padding: 18px;
  display: none;
}

.ct-ai-toggle:checked + .ct-ai-tab + .ct-ai-panel {
  display: block;
}

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

.ct-ai-panel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}

.ct-ai-panel-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ct-ai-close {
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #cbd5e1;
}

.ct-ai-chat-form {
  display: grid;
  gap: 12px;
}

.ct-ai-title,
.ct-ai-chat-input,
.ct-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  box-sizing: border-box;
}

.ct-ai-title {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.3);
  background: #111827;
  color: #fff;
}

.ct-ai-chat-input {
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.3);
  background: #111827;
  color: #fff;
  line-height: 1.6;
}

.ct-ai-title::placeholder,
.ct-ai-chat-input::placeholder {
  color: #94a3b8;
}

.ct-ai-privacy-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ct-ai-privacy-note a {
  color: #93c5fd;
  text-decoration: underline;
}

.ct-ai-chat-footer {
  display: grid;
  gap: 12px;
}

.ct-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-ai-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.15);
  border: 1px solid rgba(96,165,250,.25);
  color: #dbeafe;
  font-size: 12px;
}

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

.ct-btn.ct-btn-hero,
.ct-btn,
button,
input[type="submit"] {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.ct-btn.ct-btn-hero:hover,
.ct-btn:hover,
button:hover,
input[type="submit"]:hover {
  background: #1d4ed8;
}

.ct-text-link {
  color: #93c5fd;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ct-ai-drawer {
    right: 12px;
    bottom: 12px;
  }

  .ct-ai-panel {
    right: 12px;
    bottom: 72px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }

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

/* ===== AI Chat Drawer Fix ===== */
.ct-ai-drawer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.ct-ai-toggle {
  display: none;
}

.ct-ai-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-weight: 700;
}

.ct-ai-tab:hover {
  background: #1d4ed8;
}

.ct-ai-tab-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 12px;
}

.ct-ai-panel {
  position: fixed;
  right: 24px;
  bottom: 84px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  padding: 18px;
  display: none;
}

.ct-ai-toggle:checked + .ct-ai-tab + .ct-ai-panel {
  display: block;
}

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

.ct-ai-panel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}

.ct-ai-panel-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ct-ai-close {
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #cbd5e1;
}

.ct-ai-chat-form {
  display: grid;
  gap: 12px;
}

.ct-ai-title,
.ct-ai-chat-input,
.ct-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  box-sizing: border-box;
}

.ct-ai-title {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.3);
  background: #111827;
  color: #fff;
}

.ct-ai-chat-input {
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.3);
  background: #111827;
  color: #fff;
  line-height: 1.6;
}

.ct-ai-title::placeholder,
.ct-ai-chat-input::placeholder {
  color: #94a3b8;
}

.ct-ai-privacy-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ct-ai-privacy-note a {
  color: #93c5fd;
  text-decoration: underline;
}

.ct-ai-chat-footer {
  display: grid;
  gap: 12px;
}

.ct-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-ai-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.15);
  border: 1px solid rgba(96,165,250,.25);
  color: #dbeafe;
  font-size: 12px;
}

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

.ct-btn.ct-btn-hero,
.ct-btn,
button,
input[type="submit"] {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.ct-btn.ct-btn-hero:hover,
.ct-btn:hover,
button:hover,
input[type="submit"]:hover {
  background: #1d4ed8;
}

.ct-text-link {
  color: #93c5fd;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ct-ai-drawer {
    right: 12px;
    bottom: 12px;
  }

  .ct-ai-panel {
    right: 12px;
    bottom: 72px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }

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

/* ===== Mobile readability cleanup: dashboard / task lists / workspace ===== */
.ct-mobile-dashboard,
.ct-mobile-task-list-index,
.ct-mobile-workspace-only-cards {
  display: grid;
  gap: 18px;
}

.ct-mobile-page-head {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.ct-mobile-page-head h1 {
  margin: 0;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.1;
  color: #f8fafc;
}

.ct-mobile-page-head p {
  margin: 0;
  color: #a8b3c7;
  font-size: clamp(16px, 4vw, 24px);
  line-height: 1.8;
}

.ct-mobile-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.ct-mobile-ai-open {
  cursor: pointer;
}

.ct-btn-muted {
  background: rgba(30, 41, 59, .82);
  color: #f8fafc;
}

.ct-mobile-panel,
.ct-mobile-task-list-card,
.ct-mobile-workspace-card {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .14), transparent 38%),
    rgba(15, 23, 42, .78);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.ct-mobile-panel {
  padding: clamp(20px, 5vw, 34px);
}

.ct-mobile-panel-link,
.ct-mobile-recent-item,
.ct-mobile-task-list-main {
  color: inherit;
  text-decoration: none;
}

.ct-mobile-panel-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.ct-mobile-panel-icon,
.ct-mobile-list-avatar,
.ct-mobile-workspace-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .24);
  border: 1px solid rgba(96, 165, 250, .35);
  font-weight: 800;
}

.ct-mobile-panel-icon.danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, .18);
  border-color: rgba(251, 113, 133, .38);
}

.ct-mobile-panel-icon.list {
  color: #bfdbfe;
}

.ct-mobile-panel-body h2,
.ct-mobile-section-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1.25;
}

.ct-mobile-panel-body p {
  margin: 8px 0 0;
  color: #a8b3c7;
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1.55;
}

.ct-mobile-chevron {
  color: #cbd5e1;
  font-size: 42px;
  line-height: 1;
}

.ct-mobile-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.ct-mobile-small-link {
  color: #60a5fa;
  font-weight: 800;
  text-decoration: none;
}

.ct-mobile-recent-list {
  display: grid;
  gap: 0;
}

.ct-mobile-recent-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.ct-mobile-recent-item:first-child {
  border-top: 0;
}

.ct-mobile-list-avatar.done {
  background: rgba(16, 185, 129, .22);
  border-color: rgba(52, 211, 153, .36);
  color: #86efac;
}

.ct-mobile-list-avatar.todo {
  background: rgba(124, 58, 237, .2);
  border-color: rgba(167, 139, 250, .35);
}

.ct-mobile-recent-main strong {
  display: block;
  color: #f8fafc;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.25;
}

.ct-mobile-progress-line {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  color: #a8b3c7;
  font-weight: 700;
}

.ct-mobile-progress-line .good {
  color: #34d399;
}

.ct-mobile-progress-line .bad {
  color: #fb7185;
}

.ct-mobile-progress {
  width: 100%;
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, .72);
}

.ct-mobile-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #34d399);
}

.ct-mobile-empty {
  margin: 0;
  color: #a8b3c7;
  font-size: 18px;
  line-height: 1.7;
}

/* Todo list cards */
.ct-mobile-task-list-card {
  padding: clamp(16px, 4vw, 28px);
}

.ct-mobile-task-list-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.ct-mobile-task-list-content {
  min-width: 0;
}

.ct-mobile-task-list-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.ct-mobile-task-list-title-row h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(24px, 6vw, 38px);
  line-height: 1.2;
  word-break: break-word;
}

.ct-mobile-task-list-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.ct-mobile-task-list-meta small {
  display: block;
  color: #93a4bd;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ct-mobile-task-list-meta strong {
  color: #f8fafc;
  font-size: 28px;
  line-height: 1;
}

.ct-mobile-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(22, 163, 74, .22);
  border: 1px solid rgba(74, 222, 128, .2);
  font-weight: 800;
}

.ct-mobile-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.ct-mobile-inline-form {
  display: inline;
  margin: 0;
}

.ct-mobile-action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(51, 65, 85, .78);
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.ct-mobile-action-btn.danger {
  background: rgba(127, 29, 29, .5);
  color: #fecaca;
}

/* Workspace simplified */
.ct-mobile-workspace-only-cards {
  margin-top: 24px;
}

.ct-mobile-workspace-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 4vw, 28px);
  align-items: center;
  padding: clamp(24px, 6vw, 42px);
}

.ct-mobile-workspace-icon {
  width: 74px;
  height: 74px;
  font-size: 26px;
}

.ct-mobile-workspace-card-body h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.2;
}

.ct-mobile-workspace-card-body p {
  margin: 10px 0 22px;
  color: #a8b3c7;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 800;
}

.ct-mobile-manage-btn {
  width: fit-content;
  min-width: 210px;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 680px) {
  .ct-mobile-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ct-mobile-page-actions .ct-btn {
    width: 100%;
    justify-content: center;
  }

  .ct-mobile-task-list-card {
    border-radius: 20px;
  }

  .ct-mobile-card-actions {
    justify-content: stretch;
  }

  .ct-mobile-card-actions > * {
    flex: 1;
  }

  .ct-mobile-action-btn {
    width: 100%;
  }

  .ct-mobile-workspace-card {
    grid-template-columns: 1fr;
  }

  .ct-mobile-workspace-icon {
    width: 62px;
    height: 62px;
  }

  .ct-mobile-manage-btn {
    width: 100%;
  }
}

/* ===== Todo-first mobile redesign ===== */
.ct-todo-dashboard {
  display: grid;
  gap: 18px;
}

.ct-todo-summary-grid {
  display: grid;
  gap: 18px;
}

.ct-todo-summary-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  color: inherit;
  text-decoration: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .14), transparent 38%),
    rgba(15, 23, 42, .78);
}

.ct-todo-summary-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .24);
  border: 1px solid rgba(96, 165, 250, .35);
  color: #dbeafe;
  font-weight: 800;
}

.ct-todo-summary-icon.danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, .18);
  border-color: rgba(251, 113, 133, .38);
}

.ct-todo-summary-card h2,
.ct-todo-section-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.2;
}

.ct-todo-summary-card p {
  margin: 8px 0 0;
  color: #a8b3c7;
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1.6;
}

.ct-todo-summary-card > span {
  font-size: 42px;
  color: #cbd5e1;
}

.ct-todo-dashboard-section {
  scroll-margin-top: 120px;
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .1), transparent 38%),
    rgba(15, 23, 42, .78);
}

.ct-todo-main-section {
  margin-top: 4px;
}

.ct-todo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ct-todo-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: #2563eb;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ct-todo-empty {
  margin: 0;
  color: #a8b3c7;
  font-size: 18px;
  line-height: 1.7;
}

.ct-dashboard-task-list {
  display: grid;
  gap: 14px;
}

.ct-dashboard-task-card,
.ct-readable-task-card {
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .72);
  overflow: hidden;
}

.ct-dashboard-task-card.depth-1,
.ct-readable-task-card.depth-1 {
  margin-left: 18px;
  border-left: 3px solid rgba(96, 165, 250, .55);
}

.ct-dashboard-task-card.depth-2,
.ct-readable-task-card.depth-2 {
  margin-left: 32px;
  border-left: 3px solid rgba(52, 211, 153, .48);
}

.ct-dashboard-task-main {
  display: block;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.ct-dashboard-task-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.ct-dashboard-task-title-row h3,
.ct-readable-task-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(21px, 5vw, 32px);
  line-height: 1.25;
  word-break: break-word;
}

.ct-dashboard-task-chevron {
  color: #cbd5e1;
  font-size: 34px;
  line-height: 1;
}

.ct-dashboard-task-badges,
.ct-readable-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ct-dashboard-badge,
.ct-readable-task-meta span,
.ct-readable-task-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, .92);
  border: 1px solid rgba(148, 163, 184, .16);
  font-size: 13px;
  font-weight: 800;
}

.ct-dashboard-badge.done,
.ct-readable-task-status.done {
  color: #bbf7d0;
  background: rgba(22, 163, 74, .22);
  border-color: rgba(74, 222, 128, .18);
}

.ct-dashboard-badge.open,
.ct-readable-task-status.open {
  color: #dbeafe;
}

.ct-dashboard-task-description,
.ct-readable-task-description {
  margin: 14px 0 0;
  color: #a8b3c7;
  font-size: 16px;
  line-height: 1.7;
  word-break: break-word;
}

.ct-dashboard-subtasks,
.ct-readable-subtasks {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.ct-readable-task-card {
  padding: 18px;
}

.ct-readable-task-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

/* List-management screen */
.ct-mobile-task-list-content.full {
  width: 100%;
}

.ct-mobile-task-list-meta.compact {
  grid-template-columns: 1fr auto;
}

/* Workspace simplified */
.ct-mobile-workspace-only-cards {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.ct-mobile-workspace-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 4vw, 28px);
  align-items: center;
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .14), transparent 38%),
    rgba(15, 23, 42, .78);
}

.ct-mobile-workspace-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .24);
  border: 1px solid rgba(96, 165, 250, .35);
  font-size: 26px;
  font-weight: 800;
}

.ct-mobile-workspace-card-body h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.2;
}

.ct-mobile-workspace-card-body p {
  margin: 10px 0 22px;
  color: #a8b3c7;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 800;
}

.ct-mobile-manage-btn {
  width: fit-content;
  min-width: 210px;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 680px) {
  .ct-todo-section-head {
    align-items: flex-start;
  }

  .ct-todo-inline-action {
    font-size: 14px;
    padding-inline: 12px;
  }

  .ct-dashboard-task-main,
  .ct-readable-task-card {
    padding: 16px;
  }

  .ct-readable-task-head {
    grid-template-columns: 1fr;
  }

  .ct-mobile-workspace-card {
    grid-template-columns: 1fr;
  }

  .ct-mobile-workspace-icon {
    width: 62px;
    height: 62px;
  }

  .ct-mobile-manage-btn {
    width: 100%;
  }
}

/* Manual Todo list create button in Todo dashboard header */
a.ct-todo-inline-action {
  text-decoration: none;
}

a.ct-todo-inline-action:hover {
  filter: brightness(1.06);
}

/* Hierarchical Todo candidate display */
.ct-hierarchy-indent {
  color: #93c5fd;
  font-weight: 900;
  margin-right: 4px;
}

.ct-candidate-card {
  position: relative;
}

.ct-candidate-card:has(.ct-hierarchy-indent) {
  border-left: 3px solid rgba(96, 165, 250, .6);
}

/* Hierarchical Todo candidates */
.ct-candidate-level-1 {
  margin-left: 18px;
  border-left: 3px solid rgba(96, 165, 250, .55);
}

.ct-candidate-level-2 {
  margin-left: 34px;
  border-left: 3px solid rgba(52, 211, 153, .48);
}

.ct-candidate-level-3,
.ct-candidate-level-4 {
  margin-left: 46px;
  border-left: 3px solid rgba(167, 139, 250, .48);
}

@media (max-width: 680px) {
  .ct-candidate-level-1 { margin-left: 10px; }
  .ct-candidate-level-2 { margin-left: 18px; }
  .ct-candidate-level-3,
  .ct-candidate-level-4 { margin-left: 24px; }
}


/* Dashboard task complete/reopen actions */
.ct-dashboard-task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 18px 18px;
}

.ct-dashboard-task-action-form {
  margin: 0;
}

.ct-dashboard-task-action {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 9px 16px;
  font-weight: 800;
  cursor: pointer;
}

.ct-dashboard-task-action.good {
  background: rgba(22, 163, 74, .82);
  color: #ecfdf5;
}

.ct-dashboard-task-action.secondary {
  background: rgba(51, 65, 85, .82);
  color: #e2e8f0;
}

.ct-dashboard-task-action:hover {
  filter: brightness(1.06);
}

@media (max-width: 680px) {
  .ct-dashboard-task-actions {
    justify-content: stretch;
  }

  .ct-dashboard-task-action-form,
  .ct-dashboard-task-action {
    width: 100%;
  }
}

/* Dashboard task status visual states */
.ct-dashboard-task-card.is-open {
  box-shadow: inset 4px 0 0 rgba(96, 165, 250, .42);
}

.ct-dashboard-task-card.is-done {
  border-color: rgba(74, 222, 128, .28);
  background:
    linear-gradient(90deg, rgba(22, 163, 74, .18), rgba(15, 23, 42, .56));
  box-shadow: inset 4px 0 0 rgba(34, 197, 94, .72);
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-main {
  opacity: .86;
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-title-row h3 {
  color: #86efac;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(134, 239, 172, .55);
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-description {
  color: #94a3b8;
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-chevron {
  color: #86efac;
}

.ct-dashboard-task-card.is-done .ct-dashboard-badge.done {
  color: #052e16;
  background: rgba(134, 239, 172, .86);
  border-color: rgba(187, 247, 208, .55);
}

/* ===== ChronoTask mobile layout for iOS WKWebView ===== */
@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100svh;
  }

  img,
  video,
  canvas,
  svg,
  table {
    max-width: 100%;
  }

  .ct-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .ct-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
    padding: max(10px, env(safe-area-inset-top)) 12px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    background: rgba(8, 17, 43, .94);
    backdrop-filter: blur(14px);
  }

  .ct-brand {
    display: grid;
    gap: 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 900;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ct-brand small {
    display: block;
    margin-left: 0;
    color: #a8b3c7;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ct-nav,
  .ct-nav-simple {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .ct-nav a,
  .ct-nav button,
  .ct-nav-link {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
  }

  .ct-nav .ct-inline-form,
  .ct-inline-form {
    display: block;
    width: 100%;
    margin: 0;
  }

  .ct-nav .danger,
  .ct-nav-link.danger {
    border-color: rgba(96, 165, 250, .42);
    background: #2563eb;
    color: #fff;
  }

  .ct-main {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 14px auto 34px;
  }

  .ct-card {
    border-radius: 18px;
    padding: 16px;
  }

  .ct-page-title h1,
  .ct-card h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  .ct-page-title p,
  .ct-card p {
    font-size: 15px;
    line-height: 1.55;
  }

  .ct-todo-dashboard {
    display: grid;
    gap: 14px;
  }

  .ct-todo-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ct-todo-summary-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 18px;
    overflow: hidden;
  }

  .ct-todo-summary-card > span {
    display: none;
  }

  .ct-todo-summary-icon {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .ct-todo-summary-card h2,
  .ct-todo-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .ct-todo-summary-card p {
    margin: 6px 0 0;
    color: #a8b3c7;
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .ct-todo-dashboard-section {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 18px;
    overflow: hidden;
  }

  .ct-todo-section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }

  .ct-todo-inline-action {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
  }

  .ct-dashboard-task-card,
  .ct-readable-task-card {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }

  .ct-dashboard-task-main,
  .ct-readable-task-card {
    padding: 14px;
  }

  .ct-dashboard-task-title-row,
  .ct-readable-task-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
  }

  .ct-dashboard-task-title-row h3,
  .ct-readable-task-head h3 {
    font-size: 20px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .ct-dashboard-task-card.depth-1,
  .ct-readable-task-card.depth-1 {
    margin-left: 8px;
  }

  .ct-dashboard-task-card.depth-2,
  .ct-readable-task-card.depth-2 {
    margin-left: 14px;
  }

  .ct-dashboard-task-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 12px 12px;
  }

  .ct-dashboard-task-action-form,
  .ct-dashboard-task-action {
    width: 100%;
  }

  .ct-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .ct-actions a,
  .ct-actions button,
  .ct-actions input[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .ct-field input,
  .ct-field textarea,
  .ct-field select {
    font-size: 16px;
  }

  .ct-footer {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 0 auto 82px;
    padding-bottom: env(safe-area-inset-bottom);
    font-size: 12px;
    line-height: 1.5;
  }

  .ct-ai-drawer {
    right: 12px;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }

  .ct-ai-tab {
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .ct-ai-panel {
    right: 12px;
    left: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: calc(100svh - 112px - env(safe-area-inset-bottom));
    border-radius: 18px;
  }

  .ct-ai-panel-head h2 {
    font-size: 18px;
  }

  .ct-ai-panel-head p {
    font-size: 13px;
    line-height: 1.45;
  }

  .ct-ai-title,
  .ct-ai-chat-input {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .ct-brand {
    font-size: 22px;
  }

  .ct-nav a,
  .ct-nav button,
  .ct-nav-link {
    font-size: 14px;
    padding-inline: 8px;
  }

  .ct-todo-summary-card h2,
  .ct-todo-section-head h2 {
    font-size: 24px;
  }

  .ct-todo-summary-card p {
    font-size: 14px;
  }
}

/* ===== ChronoTask mobile primary navigation ===== */
.ct-mobile-top-actions {
  display: none;
}

.ct-mobile-top-menu {
  display: none;
}

@media (max-width: 760px) {
  .ct-topbar,
  .ct-topbar.ct-topbar-simple {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
    padding: 12px 14px;
  }

  .ct-brand {
    min-width: 0;
    font-size: 24px;
    line-height: 1.1;
    margin: 0;
  }

  .ct-brand small {
    display: block;
    margin-left: 0;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.3;
  }

  .ct-topbar > .ct-nav,
  .ct-topbar > .ct-nav-simple {
    display: none !important;
  }

  .ct-mobile-top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .ct-mobile-primary-nav {
    min-width: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ct-mobile-primary-nav::-webkit-scrollbar {
    display: none;
  }

  .ct-mobile-primary-link {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }

  .ct-mobile-primary-link.primary {
    border-color: rgba(96, 165, 250, .52);
    background: rgba(37, 99, 235, .95);
  }

  .ct-mobile-top-menu {
    display: block;
    position: relative;
  }

  .ct-mobile-top-menu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
  }

  .ct-mobile-top-menu summary::-webkit-details-marker {
    display: none;
  }

  .ct-mobile-top-menu summary::after {
    content: " ☰";
    font-weight: 900;
  }

  .ct-mobile-top-menu[open] summary {
    border-color: rgba(96, 165, 250, .55);
    background: rgba(96, 165, 250, .18);
  }

  .ct-mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(78vw, 260px);
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 16px;
    background: rgba(11, 21, 51, .98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
  }

  .ct-mobile-menu-link,
  .ct-mobile-menu-link[type="submit"] {
    appearance: none;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
  }

  .ct-mobile-menu-link.danger {
    border-color: rgba(251, 113, 133, .45);
    background: rgba(251, 113, 133, .14);
  }

  .ct-mobile-menu-form {
    display: block;
    margin: 0;
  }

  .ct-main {
    width: min(100% - 20px, 1180px);
    margin-top: 18px;
  }

  .ct-footer {
    width: min(100% - 20px, 1180px);
    margin-inline: auto;
    padding-bottom: 92px;
  }

  .ct-ai-drawer {
    max-width: calc(100% - 24px);
  }

  .ct-ai-tab {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .ct-brand {
    font-size: 22px;
  }

  .ct-brand small {
    font-size: 11px;
  }

  .ct-mobile-primary-link {
    min-width: 78px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .ct-mobile-top-menu summary {
    padding-inline: 10px;
    font-size: 13px;
  }
}

/* guest topbar cleanup */
.guest-mobile-top-actions {
  display: none;
}

@media (max-width: 760px) {
  .guest-mobile-top-actions {
    display: flex !important;
    justify-content: flex-end;
    width: 100%;
  }

  .guest-mobile-top-actions .ct-mobile-top-menu {
    display: block;
  }
}

@media (min-width: 761px) {
  .guest-top-nav {
    display: flex !important;
    gap: 10px;
  }
}

/* Mobile system bar safe-area fix: start */
:root {
  --ct-safe-top: env(safe-area-inset-top, 0px);
  --ct-safe-right: env(safe-area-inset-right, 0px);
  --ct-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ct-safe-left: env(safe-area-inset-left, 0px);
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--ct-safe-top);
  padding-right: var(--ct-safe-right);
  padding-bottom: var(--ct-safe-bottom);
  padding-left: var(--ct-safe-left);
}

.ct-shell {
  min-height: calc(100dvh - var(--ct-safe-top) - var(--ct-safe-bottom));
}

.ct-topbar {
  top: var(--ct-safe-top);
}

.ct-main {
  padding-bottom: calc(96px + var(--ct-safe-bottom));
}

.ct-footer {
  margin-bottom: calc(28px + var(--ct-safe-bottom));
  padding-bottom: calc(12px + var(--ct-safe-bottom));
}

.ct-ai-drawer {
  right: calc(24px + var(--ct-safe-right));
  bottom: calc(24px + var(--ct-safe-bottom));
}

.ct-ai-panel {
  right: calc(24px + var(--ct-safe-right));
  bottom: calc(84px + var(--ct-safe-bottom));
  max-height: calc(100dvh - 120px - var(--ct-safe-top) - var(--ct-safe-bottom));
}

.ct-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .ct-brand {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ct-brand small {
    display: none;
  }

  .ct-topbar {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .ct-nav-simple {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .ct-nav-simple .ct-nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .ct-main {
    margin-top: 16px;
    padding-bottom: calc(116px + var(--ct-safe-bottom));
  }

  .ct-table {
    min-width: 680px;
  }
}

@media (max-width: 640px) {
  .ct-ai-drawer {
    right: calc(12px + var(--ct-safe-right));
    bottom: calc(12px + var(--ct-safe-bottom));
  }

  .ct-ai-panel {
    right: calc(12px + var(--ct-safe-right));
    bottom: calc(72px + var(--ct-safe-bottom));
    max-height: calc(100dvh - 96px - var(--ct-safe-top) - var(--ct-safe-bottom));
  }
}
/* Mobile system bar safe-area fix: end */

/* Mobile todo form UX fix: start */
:root {
  --ct-safe-top: env(safe-area-inset-top, 0px);
  --ct-safe-right: env(safe-area-inset-right, 0px);
  --ct-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ct-safe-left: env(safe-area-inset-left, 0px);
}

body {
  padding-top: var(--ct-safe-top);
  padding-right: var(--ct-safe-right);
  padding-bottom: var(--ct-safe-bottom);
  padding-left: var(--ct-safe-left);
}

.ct-topbar.ct-topbar-simple {
  min-height: 56px;
  padding: 8px 14px;
  gap: 10px;
}

.ct-brand {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.ct-brand small {
  display: none;
}

.ct-nav-simple {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
}

.ct-nav-simple .ct-nav-link,
.ct-menu-summary {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.ct-menu-dropdown {
  position: relative;
  display: inline-flex;
}

.ct-menu-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.ct-menu-dropdown summary::-webkit-details-marker {
  display: none;
}

.ct-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2000;
  min-width: 156px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, .98);
  box-shadow: 0 18px 48px rgba(0,0,0,.36);
}

.ct-menu-item {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ct-menu-item.danger {
  color: #fecdd3;
  background: rgba(251, 113, 133, .14);
}

.ct-menu-form {
  margin: 0;
}

.ct-main {
  padding-bottom: calc(84px + var(--ct-safe-bottom));
}

body.ct-controller-tasks.ct-action-new_root .ct-ai-drawer,
body.ct-controller-tasks.ct-action-create_root .ct-ai-drawer,
body.ct-controller-tasks.ct-action-new .ct-ai-drawer,
body.ct-controller-tasks.ct-action-create .ct-ai-drawer,
body.ct-controller-tasks.ct-action-edit .ct-ai-drawer,
body.ct-controller-tasks.ct-action-update .ct-ai-drawer {
  display: none;
}

@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple {
    position: sticky;
    top: var(--ct-safe-top);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .ct-brand {
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
  }

  .ct-nav-simple {
    max-width: 64vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .ct-nav-simple .ct-nav-link,
  .ct-menu-summary {
    font-size: 13px;
    padding: 7px 9px;
  }

  .ct-controller-tasks .ct-form > .ct-actions {
    position: sticky;
    bottom: calc(8px + var(--ct-safe-bottom));
    z-index: 1000;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    background: rgba(15, 23, 42, .94);
    box-shadow: 0 -12px 30px rgba(0,0,0,.28);
    backdrop-filter: blur(10px);
  }

  .ct-controller-tasks .ct-form > .ct-actions .ct-btn,
  .ct-controller-tasks .ct-form > .ct-actions input[type="submit"] {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .ct-ai-tab {
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
  }

  .ct-ai-tab strong {
    display: none;
  }

  .ct-ai-tab-icon {
    width: 30px;
    height: 30px;
  }

  .ct-ai-drawer {
    right: calc(12px + var(--ct-safe-right));
    bottom: calc(16px + var(--ct-safe-bottom));
  }

  .ct-ai-panel {
    right: calc(12px + var(--ct-safe-right));
    bottom: calc(76px + var(--ct-safe-bottom));
    max-height: calc(100dvh - 96px - var(--ct-safe-top) - var(--ct-safe-bottom));
  }
}
/* Mobile todo form UX fix: end */

/* Mobile compact topbar balance: start */
@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 54px;
    padding: 8px 10px;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    flex: 0 1 98px;
    min-width: 78px;
    max-width: 98px;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(16px, 4vw, 19px);
    line-height: 1.05;
  }

  .ct-topbar.ct-topbar-simple .ct-brand small {
    display: none !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px;
    overflow: visible;
    padding: 0;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 14px;
    font-size: clamp(12px, 3.3vw, 14px);
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown {
    flex: 0 0 auto;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    max-width: 82px;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-panel {
    top: calc(100% + 8px);
    right: 0;
  }
}

@media (max-width: 380px) {
  .ct-topbar.ct-topbar-simple {
    gap: 6px !important;
    padding-left: 8px;
    padding-right: 8px;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    flex-basis: 90px;
    min-width: 74px;
    max-width: 90px;
    font-size: 16px;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple {
    gap: 4px;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 12px;
    border-radius: 13px;
  }
}

@media (max-width: 340px) {
  .ct-topbar.ct-topbar-simple .ct-brand {
    flex-basis: 82px;
    min-width: 68px;
    max-width: 82px;
    font-size: 15px;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 11.5px;
  }
}
/* Mobile compact topbar balance: end */

/* Mobile topbar one-line balance fix: start */
@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple {
    display: grid;
    grid-template-columns: minmax(88px, 1.05fr) minmax(0, 2.55fr);
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 8px 10px;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(15px, 3.9vw, 18px);
    line-height: 1;
    letter-spacing: -0.03em;
  }

  .ct-topbar.ct-topbar-simple .ct-brand small {
    display: none;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple {
    display: grid;
    grid-template-columns: minmax(48px, .72fr) minmax(82px, 1.14fr) minmax(70px, .92fr);
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: visible;
    padding: 0;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 6px;
    border-radius: 16px;
    font-size: clamp(11px, 3.15vw, 13px);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown {
    width: 100%;
    min-width: 0;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-panel {
    right: 0;
  }
}

@media (max-width: 380px) {
  .ct-topbar.ct-topbar-simple {
    grid-template-columns: minmax(78px, .92fr) minmax(0, 2.7fr);
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    font-size: 14px;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple {
    grid-template-columns: minmax(44px, .68fr) minmax(78px, 1.16fr) minmax(62px, .88fr);
    gap: 4px;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    min-height: 36px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 10.5px;
  }
}
/* Mobile topbar one-line balance fix: end */

/* Topbar balanced mobile layout: start */
.ct-topbar.ct-topbar-simple {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: auto !important;
  padding: 10px 14px !important;
}

.ct-topbar.ct-topbar-simple .ct-brand {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 180px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: 900 !important;
}

.ct-topbar.ct-topbar-simple .ct-brand small {
  display: none !important;
}

.ct-topbar.ct-topbar-simple .ct-primary-nav {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ct-topbar.ct-topbar-simple .ct-nav-link,
.ct-topbar.ct-topbar-simple .ct-menu-summary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  border-radius: 18px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.ct-menu-dropdown {
  position: relative !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
}

.ct-menu-dropdown summary {
  list-style: none !important;
  cursor: pointer !important;
}

.ct-menu-dropdown summary::-webkit-details-marker {
  display: none !important;
}

.ct-menu-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 3000 !important;
  min-width: 164px !important;
  display: grid !important;
  gap: 7px !important;
  padding: 8px !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 16px !important;
  background: rgba(15, 23, 42, .98) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.38) !important;
}

.ct-menu-item {
  display: flex !important;
  width: 100% !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  background: rgba(255,255,255,.06) !important;
  color: var(--text) !important;
  font: inherit !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.ct-menu-item.danger {
  color: #fecdd3 !important;
  background: rgba(251, 113, 133, .15) !important;
}

.ct-menu-form {
  margin: 0 !important;
}

@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple {
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    flex: 0 1 96px !important;
    max-width: 96px !important;
    font-size: 15px !important;
    letter-spacing: -.02em !important;
  }

  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 5px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    min-height: 36px !important;
    border-radius: 16px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-todo {
    flex: 0 0 52px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-workspace {
    flex: 0 0 86px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown {
    flex: 0 0 70px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    width: 70px !important;
  }
}

@media (max-width: 360px) {
  .ct-topbar.ct-topbar-simple {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    flex-basis: 86px !important;
    max-width: 86px !important;
    font-size: 14px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    gap: 4px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-link,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    padding: 0 7px !important;
    font-size: 11px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-todo {
    flex-basis: 46px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-workspace {
    flex-basis: 78px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown,
  .ct-topbar.ct-topbar-simple .ct-menu-summary {
    flex-basis: 62px !important;
    width: 62px !important;
  }
}
/* Topbar balanced mobile layout: end */

/* Mobile header and AI placement final override: start */
@media (max-width: 760px) {
  .ct-topbar,
  .ct-topbar.ct-topbar-simple {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-height: 54px !important;
    padding: 7px 10px !important;
    overflow: visible !important;
  }

  .ct-topbar .ct-brand,
  .ct-topbar.ct-topbar-simple .ct-brand {
    flex: 0 0 clamp(72px, 22vw, 96px) !important;
    min-width: 0 !important;
    max-width: clamp(72px, 22vw, 96px) !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: clamp(14px, 3.7vw, 17px) !important;
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
  }

  .ct-topbar .ct-brand small,
  .ct-topbar.ct-topbar-simple .ct-brand small {
    display: none !important;
  }

  /* PC用ナビをモバイルでは必ず隠す。二重表示対策 */
  .ct-topbar > .ct-nav,
  .ct-topbar > .ct-nav-simple,
  .ct-topbar.ct-topbar-simple > .ct-nav,
  .ct-topbar.ct-topbar-simple > .ct-nav-simple {
    display: none !important;
  }

  /* モバイル用ナビだけを横並びにする */
  .ct-mobile-top-actions {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    overflow: visible !important;
  }

  .ct-mobile-primary-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    overflow: visible !important;
  }

  .ct-mobile-primary-link {
    flex: 0 1 auto !important;
    min-width: 54px !important;
    max-width: 88px !important;
    min-height: 36px !important;
    padding: 0 8px !important;
    border-radius: 15px !important;
    font-size: clamp(11px, 3vw, 13px) !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .ct-mobile-primary-link:nth-child(2) {
    min-width: 78px !important;
    max-width: 92px !important;
  }

  .ct-mobile-top-menu {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    display: block !important;
    position: relative !important;
  }

  .ct-mobile-top-menu summary {
    min-width: 66px !important;
    min-height: 36px !important;
    padding: 0 8px !important;
    border-radius: 15px !important;
    font-size: clamp(11px, 3vw, 13px) !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .ct-mobile-top-menu summary::after {
    content: "" !important;
    display: none !important;
  }

  .ct-mobile-menu-panel {
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    z-index: 3000 !important;
  }

  /* ゲスト画面は ChronoTask + メニュー のみにする */
  .guest-mobile-top-actions {
    flex: 0 0 auto !important;
  }

  /* AIチャットを右下の小さいボタンに戻す */
  .ct-ai-drawer {
    position: fixed !important;
    left: auto !important;
    right: calc(14px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    z-index: 1800 !important;
  }

  .ct-ai-tab {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .ct-ai-tab strong {
    display: none !important;
  }

  .ct-ai-tab-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .ct-ai-panel {
    left: auto !important;
    right: calc(12px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(360px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 380px) {
  .ct-topbar,
  .ct-topbar.ct-topbar-simple {
    gap: 4px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .ct-topbar .ct-brand,
  .ct-topbar.ct-topbar-simple .ct-brand {
    flex-basis: 70px !important;
    max-width: 70px !important;
    font-size: 13px !important;
  }

  .ct-mobile-primary-nav,
  .ct-mobile-top-actions {
    gap: 3px !important;
  }

  .ct-mobile-primary-link {
    min-width: 50px !important;
    max-width: 76px !important;
    min-height: 34px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 10.5px !important;
  }

  .ct-mobile-primary-link:nth-child(2) {
    min-width: 72px !important;
    max-width: 80px !important;
  }

  .ct-mobile-top-menu summary {
    min-width: 60px !important;
    min-height: 34px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 10.5px !important;
  }
}
/* Mobile header and AI placement final override: end */

/* AI chat mobile button final v5: start */
@media (max-width: 760px) {
  .ct-ai-drawer {
    position: fixed !important;
    left: auto !important;
    right: calc(18px + var(--ct-safe-right, 0px)) !important;
    bottom: calc(64px + var(--ct-safe-bottom, 0px)) !important;
    z-index: 1200 !important;
    width: auto !important;
    max-width: calc(100vw - 36px) !important;
    transform: none !important;
    overflow: visible !important;
  }

  .ct-ai-drawer .ct-ai-tab {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    gap: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .34) !important;
  }

  .ct-ai-drawer .ct-ai-tab-icon {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .ct-ai-drawer .ct-ai-tab strong {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: #eff6ff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .ct-ai-panel {
    right: calc(12px + var(--ct-safe-right, 0px)) !important;
    bottom: calc(124px + var(--ct-safe-bottom, 0px)) !important;
    max-height: calc(100dvh - 146px - var(--ct-safe-top, 0px) - var(--ct-safe-bottom, 0px)) !important;
  }
}

@media (max-width: 380px) {
  .ct-ai-drawer {
    right: calc(14px + var(--ct-safe-right, 0px)) !important;
    bottom: calc(58px + var(--ct-safe-bottom, 0px)) !important;
  }

  .ct-ai-drawer .ct-ai-tab {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
  }

  .ct-ai-drawer .ct-ai-tab strong {
    font-size: 13px !important;
  }

  .ct-ai-panel {
    bottom: calc(116px + var(--ct-safe-bottom, 0px)) !important;
    max-height: calc(100dvh - 136px - var(--ct-safe-top, 0px) - var(--ct-safe-bottom, 0px)) !important;
  }
}
/* AI chat mobile button final v5: end */

/* Done todo strikethrough final: start */
.ct-dashboard-task-card.is-done {
  border-color: rgba(74, 222, 128, .48) !important;
  background:
    linear-gradient(90deg, rgba(22, 101, 52, .26), rgba(15, 23, 42, .72)) !important;
  box-shadow:
    inset 5px 0 0 rgba(34, 197, 94, .86),
    0 0 0 1px rgba(34, 197, 94, .10) !important;
}

/* ラベルは出さない */
.ct-dashboard-task-card.is-done .ct-dashboard-task-main::before {
  content: none !important;
  display: none !important;
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-title-row h3 {
  color: #bbf7d0 !important;
  opacity: .82 !important;
  text-decoration-line: line-through !important;
  text-decoration-thickness: 4px !important;
  text-decoration-color: rgba(248, 250, 252, .92) !important;
  text-decoration-skip-ink: none !important;
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-description {
  color: rgba(203, 213, 225, .68) !important;
}

.ct-dashboard-task-card.is-done .ct-dashboard-badge.done {
  border-color: rgba(187, 247, 208, .56) !important;
  background: rgba(134, 239, 172, .90) !important;
  color: #052e16 !important;
  font-weight: 900 !important;
}

.ct-dashboard-task-card.is-done .ct-dashboard-task-action.secondary {
  background: rgba(51, 65, 85, .92) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(148, 163, 184, .20) !important;
}

@media (max-width: 680px) {
  .ct-dashboard-task-card.is-done .ct-dashboard-task-title-row h3 {
    text-decoration-thickness: 3.5px !important;
  }
}
/* Done todo strikethrough final: end */

/* Mobile topbar overlap fix final: start */
@media (max-width: 760px) {
  /*
   * The mobile header must stay in normal document flow.
   * If it becomes fixed/absolute, the first card/title is hidden under it.
   */
  .ct-topbar,
  .ct-topbar.ct-topbar-simple {
    position: sticky !important;
    top: 0 !important;
    z-index: 1100 !important;
    transform: none !important;
  }

  .ct-shell {
    overflow: visible !important;
  }

  .ct-main {
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
    padding-top: 18px !important;
  }

  .ct-main > *:first-child {
    margin-top: 0 !important;
  }

  /*
   * Public/legal pages have large headings near the top.
   * Give them a little more breathing room below the topbar.
   */
  body.ct-controller-public_pages .ct-main,
  body.ct-controller-public-pages .ct-main {
    padding-top: 24px !important;
    padding-bottom: calc(96px + var(--ct-safe-bottom, 0px)) !important;
  }

  /*
   * AI chat is not needed on legal/support/account pages and can cover text.
   */
  body.ct-controller-public_pages .ct-ai-drawer,
  body.ct-controller-public-pages .ct-ai-drawer,
  body.ct-controller-sessions .ct-ai-drawer,
  body.ct-controller-users .ct-ai-drawer {
    display: none !important;
  }
}
/* Mobile topbar overlap fix final: end */

/* Mobile todo form title overlap guard */
@media (max-width: 760px) {
  body.ct-controller-tasks.ct-action-new_root .ct-main,
  body.ct-controller-tasks.ct-action-create_root .ct-main,
  body.ct-controller-tasks.ct-action-new .ct-main,
  body.ct-controller-tasks.ct-action-create .ct-main,
  body.ct-controller-tasks.ct-action-edit .ct-main,
  body.ct-controller-tasks.ct-action-update .ct-main {
    padding-top: calc(30px + var(--ct-safe-top, 0px)) !important;
    scroll-padding-top: calc(92px + var(--ct-safe-top, 0px)) !important;
  }

  body.ct-controller-tasks.ct-action-new_root .ct-main h1:first-child,
  body.ct-controller-tasks.ct-action-new .ct-main h1:first-child,
  body.ct-controller-tasks.ct-action-edit .ct-main h1:first-child,
  body.ct-controller-tasks.ct-action-new_root .ct-card:first-child,
  body.ct-controller-tasks.ct-action-new .ct-card:first-child,
  body.ct-controller-tasks.ct-action-edit .ct-card:first-child {
    margin-top: 0 !important;
  }
}

/* Todo form required/optional label clarity: start */
.ct-required-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(248, 113, 113, .45);
  border-radius: 999px;
  background: rgba(248, 113, 113, .18);
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.ct-required-help {
  margin-top: 8px;
  color: #bfdbfe;
  font-weight: 700;
}

.ct-field input[required],
.ct-field textarea[required],
.ct-field select[required] {
  border-color: rgba(96, 165, 250, .55);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .14);
}

@media (max-width: 760px) {
  .ct-required-mark {
    padding: 3px 7px;
    font-size: 11px;
  }

  .ct-required-help {
    font-size: 13px;
  }
}
/* Todo form required/optional label clarity: end */

/* Tester feedback fixes: Todo mobile header and form actions */
.ct-topbar.ct-topbar-simple .ct-brand {
  display: inline-flex !important;
  align-items: baseline !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

.ct-topbar.ct-topbar-simple .ct-brand small {
  display: inline !important;
  margin-left: 8px !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.ct-form > .ct-actions .ct-btn,
.ct-form > .ct-actions input[type="submit"] {
  min-height: 46px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

.ct-form > .ct-actions input[type="submit"].ct-btn,
.ct-form > .ct-actions button[type="submit"].ct-btn {
  border-color: rgba(96, 165, 250, .62) !important;
  background: rgba(96, 165, 250, .24) !important;
  font-weight: 900 !important;
}

.ct-form > .ct-actions .ct-btn.secondary {
  font-weight: 800 !important;
}

@media (max-width: 760px) {
  .ct-topbar,
  .ct-topbar.ct-topbar-simple {
    gap: 6px !important;
    justify-content: flex-start !important;
  }

  .ct-topbar .ct-brand,
  .ct-topbar.ct-topbar-simple .ct-brand {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 17px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .ct-topbar .ct-brand small,
  .ct-topbar.ct-topbar-simple .ct-brand small {
    display: none !important;
  }

  .ct-mobile-top-actions {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  .ct-mobile-primary-nav {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  .ct-mobile-primary-link {
    min-width: 50px !important;
    max-width: 84px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    letter-spacing: 0 !important;
  }

  .ct-mobile-primary-link:nth-child(2) {
    min-width: 72px !important;
    max-width: 88px !important;
  }

  .ct-mobile-top-menu summary {
    min-width: 58px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    letter-spacing: 0 !important;
  }

  .ct-controller-tasks .ct-form > .ct-actions .ct-btn,
  .ct-controller-tasks .ct-form > .ct-actions input[type="submit"] {
    min-height: 48px !important;
    font-size: 16px !important;
  }
}\n
/* Workspace group creation and topbar right menu fix: start */
.ct-topbar.ct-topbar-simple {
  display: flex !important;
  align-items: center !important;
}

.ct-topbar.ct-topbar-simple .ct-primary-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.ct-topbar.ct-topbar-simple .ct-menu-dropdown {
  margin-left: auto !important;
}

.ct-group-list {
  display: grid;
  gap: 12px;
}

.ct-group-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, .40);
}

.ct-group-list-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ct-group-list-card p {
  margin: 0;
  color: var(--muted);
}

.ct-group-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .ct-mobile-top-actions {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .ct-mobile-primary-nav {
    flex: 0 1 auto !important;
    justify-content: flex-start !important;
  }

  .ct-mobile-top-menu {
    margin-left: auto !important;
  }

  .ct-group-list-card {
    align-items: stretch;
    flex-direction: column;
  }

  .ct-group-list-actions {
    justify-content: stretch;
  }

  .ct-group-list-actions .ct-btn,
  .ct-group-list-actions form,
  .ct-group-list-actions button {
    width: 100%;
  }
}
/* Workspace group creation and topbar right menu fix: end */

/* Mobile topbar menu right align final: start */
.ct-topbar,
.ct-topbar.ct-topbar-simple {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.ct-topbar .ct-brand {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.ct-topbar .ct-primary-nav,
.ct-mobile-top-actions,
.ct-mobile-primary-nav {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

.ct-topbar .ct-primary-nav,
.ct-mobile-top-actions {
  flex: 1 1 auto !important;
}

.ct-menu-dropdown,
.ct-mobile-top-menu {
  margin-left: auto !important;
  flex: 0 0 auto !important;
}

@media (max-width: 760px) {
  .ct-topbar {
    padding-inline: 10px !important;
  }

  .ct-topbar .ct-brand {
    font-size: 20px !important;
    max-width: none !important;
  }

  .ct-topbar .ct-primary-nav,
  .ct-mobile-primary-nav {
    gap: 6px !important;
  }

  .ct-topbar .ct-primary-nav a,
  .ct-topbar .ct-primary-nav summary,
  .ct-mobile-primary-nav a,
  .ct-mobile-top-menu summary {
    white-space: nowrap !important;
  }
}
/* Mobile topbar menu right align final: end */\n
/* Workspace group members page: start */
.ct-group-list-card .ct-group-member-role {
  color: var(--muted);
  font-size: 13px;
}

.ct-page-title .ct-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .ct-page-title {
    gap: 12px;
  }

  .ct-page-title .ct-actions,
  .ct-page-title .ct-actions .ct-btn {
    width: 100%;
  }
}
/* Workspace group members page: end */\n
/* Workspace member search: start */
.ct-search-form {
  margin: 0;
}

.ct-search-form .ct-actions {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .ct-search-form .ct-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* Workspace member search: end */\n\n
/* AI creation examples UX: start */
.ct-ai-guide {
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, .35);
}

.ct-ai-guide h2 {
  margin: 0 0 6px;
}

.ct-ai-example-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ct-ai-example-grid.compact {
  margin-top: 0;
}

.ct-ai-example-button {
  border: 1px solid rgba(147, 197, 253, .30);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(37, 99, 235, .18);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.ct-ai-example-button:hover {
  background: rgba(37, 99, 235, .30);
}

@media (max-width: 760px) {
  .ct-ai-example-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ct-ai-example-button {
    width: 100%;
  }

  .ct-ai-tab strong {
    white-space: nowrap;
  }
}
/* AI creation examples UX: end */

/* Desktop topbar alignment final: start */
@media (min-width: 761px) {
  .ct-topbar.ct-topbar-simple {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-todo {
    margin-left: 0 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-workspace {
    margin-left: auto !important;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown {
    margin-left: 8px !important;
    flex: 0 0 auto !important;
  }

  .ct-mobile-top-actions {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    display: none !important;
  }

  .ct-mobile-top-actions {
    display: flex !important;
  }
}
/* Desktop topbar alignment final: end */

/* Group home and requested topbar final layout: start */
.ct-group-name-link {
  color: var(--text);
  text-decoration: none;
}

.ct-group-name-link:hover {
  color: #dbeafe;
}

.ct-group-home-section {
  margin-bottom: 16px;
}

.ct-group-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.ct-group-section-head p {
  margin: 0;
}

.ct-group-todo-columns {
  align-items: start;
}

.ct-group-task-list,
.ct-group-chat-list {
  display: grid;
  gap: 10px;
}

.ct-group-task-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, .42);
}

.ct-group-task-card.done {
  opacity: .74;
}

.ct-group-task-main {
  display: grid;
  gap: 8px;
}

.ct-group-task-card h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.ct-group-task-card p {
  margin: 0;
}

.ct-group-chat-message {
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .04);
}

.ct-group-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.ct-group-chat-meta strong {
  color: var(--text);
}

.ct-group-chat-body p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.ct-group-chat-form {
  margin-top: 14px;
}

.ct-topbar.ct-topbar-simple {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  overflow: visible !important;
}

.ct-topbar.ct-topbar-simple .ct-brand {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  letter-spacing: 0 !important;
}

.ct-topbar.ct-topbar-simple .ct-brand small {
  display: none !important;
}

@media (min-width: 761px) {
  .ct-topbar.ct-topbar-simple {
    justify-content: flex-start !important;
    padding: 14px 20px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-todo {
    margin-left: 0 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-nav-workspace {
    margin-left: auto !important;
  }

  .ct-topbar.ct-topbar-simple .ct-menu-dropdown {
    margin-left: 8px !important;
    flex: 0 0 auto !important;
  }

  .ct-topbar.ct-topbar-simple .ct-mobile-top-actions {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .ct-topbar.ct-topbar-simple {
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 54px !important;
    padding: 8px 10px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .ct-topbar.ct-topbar-simple .ct-primary-nav {
    display: none !important;
  }

  .ct-mobile-top-actions {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .ct-mobile-primary-nav {
    display: flex !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
  }

  .ct-mobile-primary-link,
  .ct-mobile-top-menu summary {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 16px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  .ct-mobile-primary-link {
    flex: 0 0 auto !important;
    min-width: 46px !important;
  }

  .ct-mobile-primary-link:nth-child(2) {
    min-width: 78px !important;
  }

  .ct-mobile-top-menu {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }

  .ct-mobile-top-menu summary {
    min-width: 58px !important;
  }

  .ct-group-section-head {
    flex-direction: column;
  }

  .ct-group-section-head .ct-actions,
  .ct-page-title .ct-actions {
    width: 100%;
  }

  .ct-group-section-head .ct-btn,
  .ct-page-title .ct-actions .ct-btn {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .ct-topbar.ct-topbar-simple {
    gap: 5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .ct-topbar.ct-topbar-simple .ct-brand {
    font-size: 17px !important;
  }

  .ct-mobile-primary-nav {
    gap: 4px !important;
  }

  .ct-mobile-primary-link,
  .ct-mobile-top-menu summary {
    min-height: 34px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 11px !important;
  }

  .ct-mobile-primary-link:nth-child(2) {
    min-width: 72px !important;
  }

  .ct-mobile-top-menu summary {
    min-width: 54px !important;
  }
}
/* Group home and requested topbar final layout: end */

/* Completed todo stable delete button: start */
.ct-dashboard-task-actions,
.ct-readable-task-actions,
.ct-task-actions {
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

.ct-dashboard-task-action-form,
.ct-inline-form {
  position: relative;
  z-index: 31;
  display: inline-flex;
  pointer-events: auto;
}

.ct-dashboard-task-action.danger,
.ct-readable-task-delete-action,
.ct-btn.danger {
  pointer-events: auto;
  touch-action: manipulation;
}

.ct-dashboard-task-main {
  position: relative;
  z-index: 1;
}
/* Completed todo stable delete button: end */

