/* Keep the complete week visible beside the AI panel on desktop. */
.week-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow-x: hidden;
}

.day-column {
  height: 520px;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 880px) {
  .week-grid {
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    overflow-x: auto;
  }
}

.draggable-card {
  cursor: grab;
  touch-action: none;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  will-change: transform;
}

.draggable-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px rgba(255,255,255,.58), inset 0 -1px rgba(44,51,78,.07), 0 8px 16px rgba(44,51,78,.17);
}

.draggable-card.is-multi-day:hover {
  transform: none;
  box-shadow: none;
}

.task-card.is-multi-day.is-group-hovered {
  z-index: 2;
  transform: translateY(-3px);
  box-shadow: inset 0 1px rgba(255,255,255,.55), inset 0 -1px rgba(44,51,78,.07), 0 10px 12px -8px rgba(44,51,78,.32);
}

.penguin {
  width: 42px;
  height: 42px;
  flex: none;
  overflow: hidden;
  padding: 0;
}

.penguin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sync-indicator {
  width:auto;
  min-height:30px;
  margin:7px 10px 0;
  padding:7px 9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#aeb8d0;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(190,200,224,.18);
  border-radius:7px;
  cursor:pointer;
  transition:background-color 150ms ease,border-color 150ms ease,color 150ms ease;
}
.sync-indicator[hidden] { display:none; }
.sync-indicator:hover { color:#fff; background:rgba(255,255,255,.07); border-color:rgba(190,200,224,.34); }
.sync-indicator span { color:#8f98ad; font:500 8px/1 "DM Mono",monospace; letter-spacing:.12em; }
.sync-indicator strong { overflow:hidden; min-width:0; color:#dce4f7; font:500 11px/1 "DM Mono",monospace; letter-spacing:0; text-overflow:ellipsis; white-space:nowrap; }
.sync-indicator.is-dirty strong { color:#ffd67d; }
.sync-indicator.is-error strong { color:#ff9f9f; }
.sync-indicator.is-busy strong { color:#a9d8ff; }

.cloud-sync-settings { gap:11px; }
.cloud-sync-settings h3 { display:flex; align-items:center; gap:8px; margin:0; color:#20263a; font-size:15px; letter-spacing:0; }
.cloud-sync-settings label { display:grid; gap:6px; color:#687187; font-size:11px; }
.cloud-sync-settings input[type="url"],
.cloud-sync-settings input[type="password"],
.cloud-sync-settings input[type="text"] { width:100%; min-width:0; height:39px; padding:0 11px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#20263a; outline:none; }
.cloud-sync-settings input:focus { border-color:#7562f4; box-shadow:0 0 0 2px rgba(117,98,244,.12); }
.cloud-sync-badge { padding:2px 5px; border-radius:4px; background:#f0eefc; color:#6558c7; font-size:9px; font-weight:650; }
.cloud-sync-code-row { display:grid; grid-template-columns:minmax(0,1fr) 52px 38px; gap:7px; }
.cloud-sync-code-row button { min-width:0; height:39px; padding:0 8px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#5f55c5; cursor:pointer; }
.cloud-sync-code-row button:hover { border-color:#cfc8fa; background:#faf9ff; }

.draggable-card:active,
.draggable-card.is-dragging {
  cursor: grabbing;
  transform: translateY(-1px) scale(0.98);
  opacity: 0.28;
}

.task-drag-ghost {
  position:fixed !important;
  top:-1000px !important;
  left:-1000px !important;
  z-index:9999;
  margin:0 !important;
  opacity:.96;
  pointer-events:none;
  transform:rotate(.7deg) scale(1.02);
  box-shadow:0 14px 30px rgba(32,38,58,.24), inset 0 1px rgba(255,255,255,.65) !important;
}

body.is-task-dragging .draggable-card:not(.is-dragging) { cursor:default; }
.day-column.has-reorder-preview { background:#fcfbff; }

.task-card {
  position: relative;
  height: 62px;
  min-height: 62px;
  overflow: hidden;
  padding-right: 31px;
  box-shadow: inset 0 1px rgba(255,255,255,.52), inset 0 -1px rgba(44,51,78,.06), 0 3px 7px -5px rgba(44,51,78,.25);
}

.task-card::before {
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(to bottom,rgba(255,255,255,.22),transparent 42%);
  content:'';
  pointer-events:none;
}
.task-card.is-untimed { display:flex; align-items:center; }
.task-card.is-untimed p { margin-bottom:0; }

.day-column header strong,
.task-card time,
.today-button span,
.calendar-day span,
#weekMeta,
.app-version {
  font-family:"Segoe UI","Noto Sans SC",sans-serif;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1,"zero" 0;
}

.day-tasks {
  flex: 1;
  min-height: 0;
  align-content: start;
  grid-auto-rows: 62px;
  margin-right: -10px;
  margin-left: -10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 10px 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.day-tasks::-webkit-scrollbar { display:none; width:0; height:0; }

.day-column > header {
  height: 27px;
  min-height: 27px;
}

.task-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.task-card.is-multi-day {
  z-index: 1;
}

.task-card.is-range-start {
  width: calc(100% + 11px);
  border-radius: 7px 0 0 7px;
}

.task-card.is-range-middle {
  left: -11px;
  width: calc(100% + 22px);
  padding-left: 18px;
  border-radius: 0;
}

.task-card.is-range-end {
  left: -11px;
  width: calc(100% + 11px);
  padding-left: 18px;
  border-radius: 0 7px 7px 0;
}

.task-complete-toggle {
  position: absolute;
  top: 8px;
  right: 7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.task-complete-toggle:hover {
  background: #fff;
}

.task-card.is-completed {
  opacity: 0.6;
}

.task-card.is-completed p {
  text-decoration: line-through;
}

.task-card.is-completed::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  content: 'DONE';
  color: currentColor;
  font: 700 8px "DM Mono", monospace;
  letter-spacing: 0.08em;
}

/* Completion appearance is deliberately separate from completion state. */
html[data-completion-style="stamp"] .task-card.is-completed {
  opacity: .64;
  filter: grayscale(.82);
}

html[data-completion-style="stamp"] .task-card.is-completed::after {
  right: 7px;
  bottom: 8px;
  padding: 2px 4px;
  border: 1px solid #a56e73;
  border-radius: 2px;
  color: #9b676d;
  font: 700 8px/1 "DM Mono", monospace;
  letter-spacing: .1em;
  transform: rotate(-7deg);
}

html[data-completion-style="pin"] .task-card.is-completed {
  opacity: .9;
  filter: none;
}

html[data-completion-style="pin"] .task-card.is-completed p {
  text-decoration: none;
}

html[data-completion-style="pin"] .task-card.is-completed::after {
  top: -9px;
  right: 8px;
  bottom: auto;
  content: '📌';
  color: initial;
  font: 15px/1 sans-serif;
  letter-spacing: 0;
  transform: rotate(13deg);
}

.day-column.is-drop-target {
  background: #fbfaff;
  box-shadow: inset 0 0 0 1px #d9d4fb;
}

/* Shared interaction polish. */
:where(button,a,input,select,textarea) { -webkit-tap-highlight-color:transparent; }
:where(button,a,input,select,textarea):focus-visible {
  outline:2px solid rgba(113,92,247,.72);
  outline-offset:2px;
}
button:not(:disabled) { transition:transform 120ms ease,box-shadow 150ms ease,background-color 150ms ease,border-color 150ms ease,color 150ms ease,opacity 150ms ease; }
button:not(:disabled):active { translate:0 1px; scale:.985; }
.dialog-close {
  position:absolute;
  top:-8px;
  right:-8px;
  display:grid;
  width:32px;
  height:32px;
  place-items:center;
  padding:0;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#8a92a3;
  font:400 25px/1 Arial,sans-serif;
}
.dialog-close:hover { border-color:#e7e9ef; background:#f5f6f9; color:#4f586d; }
.chat-composer button {
  width:30px;
  height:30px;
  padding:0;
  line-height:1;
}
.chat-composer button span {
  display:block;
  font:600 18px/1 Arial,sans-serif;
  transform:translateY(-1px);
}
:where(.chat-header-actions button,.calendar-nav,.model-row button,.show-chat-button,.week-navigator #previousWeek,.week-navigator #nextWeek) {
  display:grid;
  place-items:center;
  padding:0;
  font-family:Arial,sans-serif;
  line-height:1;
}
.new-task:hover,.save-task:hover { background:#6753eb; box-shadow:0 7px 16px rgba(91,72,219,.24); transform:translateY(-1px); }
.new-task:active,.save-task:active { box-shadow:0 3px 8px rgba(91,72,219,.2); }
.nav-item { transition:background-color 150ms ease,color 150ms ease; }
.today-button:hover,.week-navigator:hover { border-color:#d7d2f7; box-shadow:0 4px 12px rgba(32,38,58,.06); }
.add-slot { padding:4px 7px; border-radius:6px; transition:background-color 150ms ease,color 150ms ease,transform 150ms ease; }
.add-slot:hover { background:#f4f2ff; transform:translateX(2px); }
.day-actions {
  position:absolute;
  right:8px;
  bottom:10px;
  left:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:3px;
}
.day-actions .add-slot { position:static; padding:4px 5px; white-space:nowrap; }
.daily-report-button {
  min-width:0;
  padding:4px 5px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#8176cf;
  font-size:9px;
  white-space:nowrap;
}
.daily-report-button:hover { background:#f4f2ff; color:#6154ce; }
.week-report-actions { display:flex; justify-content:flex-end; margin-top:10px; }
.overdue-section { margin-top:36px; padding:17px 18px; border:1px solid #ece8e4; border-radius:12px; background:#fffdfc; }
.overdue-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.overdue-heading h2 { margin:0; font-size:16px; letter-spacing:-.03em; }
.overdue-toggle { display:flex; align-items:center; gap:7px; padding:7px 9px; border:1px solid #eadfdb; border-radius:8px; background:#fff; color:#9a6667; font-size:11px; font-weight:600; }
.overdue-toggle:hover { border-color:#d8bfc0; background:#fff9f8; }
.overdue-toggle-icon { display:inline-block; font-size:14px; line-height:1; transition:transform 160ms ease; }
.overdue-toggle[aria-expanded="true"] .overdue-toggle-icon { transform:rotate(180deg); }
.overdue-list { display:grid; gap:8px; margin-top:14px; }
.overdue-list[hidden] { display:none; }
.overdue-item { display:flex; width:100%; align-items:flex-start; gap:9px; padding:10px; border:1px solid #f0ebe8; border-radius:8px; background:#fff; text-align:left; cursor:grab; transition:border-color 150ms ease,background 150ms ease,box-shadow 150ms ease,transform 150ms ease,opacity 150ms ease; }
.overdue-item:hover { border-color:#e1d4d0; background:#fffafa; box-shadow:0 5px 14px rgba(84,61,62,.07); transform:translateY(-1px); }
.overdue-item:active { cursor:grabbing; }
.overdue-item.is-dragging { opacity:.35; cursor:grabbing; transform:scale(.985); }
.overdue-item > div { min-width:0; flex:1; }
.overdue-item-marker { width:7px; height:7px; flex:0 0 7px; margin-top:5px; border-radius:50%; }
.overdue-item strong { display:block; color:#4c5363; font-size:12px; line-height:1.45; }
.overdue-item p { margin:3px 0 0; color:#9b8790; font-size:10px; line-height:1.4; }
.overdue-item-drag { align-self:center; flex:0 0 auto; color:#c0b4b2; font:600 13px/1 "DM Mono",monospace; letter-spacing:0; }
body.is-overdue-task-dragging .day-column { transition:border-color 150ms ease,background-color 150ms ease,box-shadow 150ms ease; }
body.is-overdue-task-dragging .day-column.is-drop-target { z-index:2; border-color:#8b7af5; background:#f7f5ff; box-shadow:inset 0 0 0 2px rgba(113,92,247,.18); }
.week-report-actions button {
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 12px;
  border:1px solid #ddd9f7;
  border-radius:8px;
  background:#fff;
  color:#6258c8;
  font-size:11px;
  font-weight:600;
}
.week-report-actions button:hover { border-color:#c7c0f5; background:#f8f7ff; box-shadow:0 4px 12px rgba(32,38,58,.06); }
.task-complete-toggle { transition:transform 140ms ease,background-color 140ms ease,box-shadow 140ms ease; }
.task-complete-toggle:hover { transform:scale(1.1); box-shadow:0 3px 8px rgba(32,38,58,.12); }
.calendar-day { transition:background-color 150ms ease,box-shadow 150ms ease,color 150ms ease; }
.calendar-day:hover { box-shadow:inset 0 0 0 1px #e1ddfb; }
.chat-composer { transition:border-color 150ms ease,box-shadow 150ms ease; }
.chat-composer:focus-within { border-color:#c9c2fa; box-shadow:0 0 0 3px rgba(113,92,247,.09); }
:where(.task-dialog,.compact-dialog,.settings-dialog,.data-dialog,.week-picker) :where(input,select,textarea) {
  transition:border-color 150ms ease,box-shadow 150ms ease,background-color 150ms ease;
}
:where(.task-dialog,.compact-dialog,.settings-dialog,.data-dialog,.week-picker) :where(input,select,textarea):hover { border-color:#d3cff0; }
:where(.task-dialog,.compact-dialog,.settings-dialog,.data-dialog,.week-picker) :where(input,select,textarea):focus {
  border-color:#a99ff5;
  outline:none;
  box-shadow:0 0 0 3px rgba(113,92,247,.1);
}
dialog[open] { animation:dialog-enter 180ms cubic-bezier(.2,.78,.22,1); }
dialog[open]::backdrop { animation:backdrop-enter 180ms ease-out; }
@keyframes dialog-enter { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes backdrop-enter { from { opacity:0; } to { opacity:1; } }

.task-trash {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  max-height:0;
  min-height:0;
  overflow:hidden;
  margin-top:0;
  padding:0 14px;
  border:0 dashed transparent;
  border-radius:8px;
  background:#f8f7ff;
  color:#7468c9;
  font-size:15px;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transform:translateY(-6px);
  transition:max-height 180ms ease, min-height 180ms ease, margin 180ms ease, padding 180ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms;
}
.task-trash strong { font-size:11px; font-weight:600; }

.app-version {
  display:block;
  margin:8px 5px 0;
  color:#858da2;
  font:500 9px/1 "DM Mono", monospace;
}
body.is-task-dragging .task-trash { max-height:56px; min-height:52px; margin-top:10px; padding:11px 14px; border-width:1px; border-color:#d7d1f8; visibility:visible; opacity:1; pointer-events:auto; transform:translateY(0); transition-delay:0s; }
body.is-task-dragging .task-trash.is-drop-target { border-color:#e7969e; background:#fff0f1; color:#b95b65; }

.settings-button {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: transparent;
  color: #c6ccda;
  font-size: 12px;
  text-align: left;
}

.settings-button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.settings-button span { margin-right: 7px; }
.settings-dialog label { margin-top: 2px; }
.settings-dialog select,
.settings-dialog input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; outline-color: var(--purple); background: #fff; }
.settings-panel { display: grid; gap: 13px; }
.settings-data-entry { display:grid; gap:8px; margin-top:7px; padding:14px; border:1px solid #e6e3f8; border-radius:10px; background:#faf9ff; }
.settings-data-entry h3 { margin:0; font-size:14px; }
.settings-data-entry p:not(.eyebrow) { margin:0; color:#737b8f; font-size:11px; line-height:1.55; }
.settings-data-entry button { justify-self:start; padding:8px 10px; border:1px solid #dcd7fb; border-radius:7px; background:#fff; color:#6258c8; font-size:11px; font-weight:600; }
.task-dialog { width:min(480px,calc(100% - 35px)); }
.task-dialog select,
.task-dialog input,
.compact-dialog input { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:8px; outline-color:var(--purple); background:#fff; }
.task-category-row { display:grid; grid-template-columns:minmax(0,1fr) 42px; align-items:end; gap:8px; }
.task-date-project-row { display:grid; grid-template-columns:minmax(0, .82fr) minmax(0, 1.18fr); gap:10px; }
.task-date-project-row > label { min-width:0; }
.task-date-project-row input { font-family:"DM Mono","Noto Sans SC",sans-serif; }
.category-color-button { display:grid; width:42px; height:40px; place-items:center; padding:0; border:1px solid var(--line); border-radius:8px; background:#fff; }
.category-color-button span { width:22px; height:22px; border:1px solid rgba(32,38,58,.12); border-radius:5px; box-shadow:inset 0 0 0 2px rgba(255,255,255,.5); }
.category-color-button:hover { border-color:#bcb5f6; }
.task-time-row,
.task-date-range { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.task-dialog .task-time-control { display:flex; align-items:center; gap:8px; min-height:40px; padding:9px 10px; border:1px solid #e4e1fb; border-radius:8px; background:#faf9ff; color:#5c57a0; }
.task-dialog .task-time-control input { width:15px; height:15px; padding:0; accent-color:var(--purple); }
.task-time-row[hidden] { display:none; }
.cross-date-row { display:flex; align-items:center; gap:8px; }
.task-dialog .cross-date-control { display:flex; flex:1; grid-template-columns:none; align-items:center; gap:8px; min-height:40px; padding:9px 10px; border:1px solid #e4e1fb; border-radius:8px; background:#faf9ff; color:#5c57a0; }
.task-dialog .cross-date-control input { width:15px; height:15px; padding:0; accent-color:var(--purple); }
.date-range-button { min-height:40px; max-width:220px; overflow:hidden; padding:0 10px; border:1px solid #dfdbfb; border-radius:8px; background:#fff; color:#6258c8; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.compact-dialog { width:min(400px,calc(100% - 35px)); }
.reminder-dialog section { position:relative; display:grid; gap:13px; }
.reminder-dialog h2 { margin:0; }
.reminder-list { display:grid; gap:7px; }
.reminder-item { margin:0; padding:10px 11px; border:1px solid #e4e1fb; border-radius:8px; background:#faf9ff; color:#514a91; font-size:12px; }
.report-dialog { width:min(560px,calc(100% - 35px)); padding:30px; }
.report-dialog section { position:relative; display:grid; gap:13px; }
.report-dialog h2 { margin:0; padding-right:36px; font-size:22px; line-height:1.35; }
.report-state { min-height:18px; margin:0; color:#858da0; font-size:11px; line-height:1.6; }
.report-list { display:grid; gap:11px; margin:5px 0 8px; padding:17px 18px 17px 42px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:#343c50; font-size:13px; line-height:1.75; }
.report-list[hidden] { display:none; }
.report-list li { padding-left:4px; }
.report-list li::marker { color:#6b5ddd; font-weight:700; font-variant-numeric:tabular-nums; }
.report-copy-button { width:100%; }
.report-copy-status { min-height:17px; margin:0; color:#645ab8; font-size:10px; text-align:center; }
.compact-dialog form { display:grid; gap:13px; }
.compact-dialog fieldset { min-width:0; }
.color-fieldset { margin:0; padding:0; border:0; }
.color-fieldset legend { margin-bottom:8px; color:#626b7e; font-size:12px; }
.color-palette { display:grid; grid-template-columns:repeat(9,1fr); gap:6px; }
.color-swatch { width:100%; aspect-ratio:1; padding:0; border:1px solid rgba(32,38,58,.1); border-radius:5px; box-shadow:inset 0 0 0 2px rgba(255,255,255,.5); }
.color-swatch[aria-pressed="true"] { outline:2px solid #6f5cf5; outline-offset:2px; }
.custom-color-control { display:grid; grid-template-columns:1fr 48px; align-items:center; gap:10px; }
.compact-dialog .custom-color-control input[type="color"] { width:48px; height:36px; padding:3px; cursor:pointer; }
.task-form-error { min-height:16px; margin:0; color:#b75762; font-size:11px; }
dialog::backdrop {
  background: rgba(24, 30, 47, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.token-usage {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin:11px 10px 0;
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:7px;
  background:rgba(255,255,255,.045);
  color:#fff;
  font-variant-numeric:tabular-nums;
}
.token-usage[hidden] { display:none; }
.token-usage span { color:#8f98ad; font:500 8px/1 "DM Mono",monospace; letter-spacing:.12em; }
.token-usage strong { overflow:hidden; min-width:0; font:500 11px/1 "DM Mono",monospace; text-overflow:ellipsis; white-space:nowrap; }
.model-row { display:flex; gap:8px; }
.model-row select { min-width:0; flex:1; }
.model-row button { width:38px; flex:0 0 38px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#655bd4; font-size:18px; cursor:pointer; }
.model-row button:disabled { cursor:wait; opacity:.55; }
.model-fetch-status { min-height:16px; margin:-5px 0 0; }
.data-dialog { width:min(560px,calc(100% - 35px)); max-height:calc(100vh - 40px); overflow-y:auto; padding:28px; border:0; border-radius:18px; color:var(--ink); box-shadow:0 22px 70px rgba(22,27,43,.3); }
.data-dialog::backdrop { background:rgba(24,30,47,.42); }
.data-dialog > section { position:relative; display:grid; gap:16px; }
.data-dialog-heading { display:grid; gap:5px; padding-right:38px; }
.data-dialog h2 { margin:0; font-size:22px; }
.data-dialog h2:focus { outline:none; }
.data-dialog h3 { margin:0; color:#292f43; font-size:15px; letter-spacing:0; }
.data-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:4px; border:1px solid #e3e5ed; border-radius:8px; background:#f5f6f9; }
.data-tabs button { min-width:0; height:34px; padding:0 9px; border:0; border-radius:6px; background:transparent; color:#747c8f; font-size:11px; font-weight:650; cursor:pointer; }
.data-tabs button:hover { color:#4f566a; background:rgba(255,255,255,.65); }
.data-tabs button.is-active { color:#5549c1; background:#fff; box-shadow:0 1px 4px rgba(32,38,58,.1); }
.data-tabs button:focus-visible { outline:2px solid rgba(112,88,241,.3); outline-offset:1px; }
.data-panel { display:grid; min-width:0; gap:12px; animation:data-panel-enter 150ms ease-out; }
.data-panel[hidden] { display:none; }
.data-panel > .eyebrow { margin-bottom:-5px; }
.data-dialog label { display:grid; gap:6px; color:#626b7e; font-size:12px; }
.data-dialog input { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:8px; outline-color:var(--purple); }
.data-description { margin:0; color:#778094; font-size:12px; line-height:1.65; }
.data-description code { padding:1px 4px; border-radius:4px; background:#f1f2f6; color:#555d70; font-size:10px; }
.data-actions { display:flex; flex-wrap:wrap; gap:8px; }
.data-actions-local { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.data-actions button,.import-button { display:inline-flex; min-height:38px; align-items:center; justify-content:center; padding:8px 11px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#626b7e; font-size:11px; line-height:1.2; cursor:pointer; }
.data-actions button:hover,.import-button:hover { border-color:#cec8f3; background:#faf9ff; color:#5549c1; }
.data-actions .primary-data-action { border-color:var(--purple); background:var(--purple); color:#fff; }
.data-actions .primary-data-action:hover { border-color:#6250dc; background:#6250dc; color:#fff; }
.import-button input { display:none; }
.data-status { min-height:19px; margin:0; padding-top:11px; border-top:1px solid #ececf2; color:#5c58a0; font-size:11px; line-height:1.5; }
.data-status:empty { min-height:0; padding-top:0; border-top:0; }
.data-status.is-error { color:#b75762; }
.data-panel .data-status { padding-top:0; border-top:0; }
.data-dialog .auto-sync-control { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid #e4e1fb; border-radius:8px; background:#faf9ff; color:#5c57a0; }
.data-dialog .auto-sync-control input { width:14px; height:14px; padding:0; accent-color:var(--purple); }
@keyframes data-panel-enter { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:translateY(0); } }
.settings-note { margin: 0; color: #9299aa; font-size: 10px; line-height: 1.6; }
.chat-composer button:disabled { opacity: 0.55; cursor: wait; }
.app-shell {
  --sidebar-column:242px;
  --chat-column:330px;
  grid-template-columns:var(--sidebar-column) minmax(620px,1fr) var(--chat-column);
  transition:grid-template-columns 280ms cubic-bezier(.22,.75,.25,1);
}
.ai-panel {
  position:sticky;
  top:0;
  min-width:0;
  max-height:100vh;
  overflow:hidden;
  opacity:1;
  transform:translateX(0);
  transition:opacity 180ms ease, transform 280ms cubic-bezier(.22,.75,.25,1), padding 280ms cubic-bezier(.22,.75,.25,1), border-color 180ms ease, visibility 0s linear;
}
.ai-panel > * { min-width:calc(330px - 48px); }
.chat-log { min-height:0; overflow-y:auto; padding-right:3px; }
.chat-log,.chat-history-list { scrollbar-width:thin; scrollbar-color:#d9d5ee transparent; }
.chat-log::-webkit-scrollbar,.chat-history-list::-webkit-scrollbar { width:6px; }
.chat-log::-webkit-scrollbar-thumb,.chat-history-list::-webkit-scrollbar-thumb { border-radius:6px; background:#d9d5ee; }
.ai-message { display:block; }
.ai-message p { white-space:pre-wrap; }
.suggestion { margin-left:0; }
.chat-header-actions { display:flex; gap:6px; }
.chat-header-actions button { display:grid; width:30px; height:30px; place-items:center; padding:0; border:1px solid var(--line); border-radius:8px; background:#fff; color:#697287; font-size:17px; line-height:1; }
.chat-header-actions button:hover { border-color:#cfc9fb; background:#f8f7ff; color:#6557d8; }
.app-shell.is-chat-hidden { --chat-column:0px; }
.app-shell.is-chat-hidden .day-column { height:clamp(320px,calc(100vh - 240px),360px); }
.app-shell.is-chat-hidden .task-card { height:56px; min-height:56px; padding-top:8px; padding-bottom:8px; }
.app-shell.is-chat-hidden .task-card p { font-size:10px; line-height:1.35; }
.app-shell.is-chat-hidden .task-card time { font-size:9px; }
.app-shell.is-chat-hidden .ai-panel { visibility:hidden; padding-right:0; padding-left:0; border-left-color:transparent; opacity:0; pointer-events:none; transform:translateX(18px); transition-delay:0s,0s,0s,0s,280ms; }
.show-chat-button { position:fixed; z-index:3; top:50%; right:12px; display:grid; width:34px; height:46px; place-items:center; padding:0; border:1px solid #dcd8f8; border-radius:8px; background:#fff; color:#6759df; box-shadow:0 6px 20px rgba(32,38,58,.1); font-size:24px; line-height:1; visibility:hidden; opacity:0; pointer-events:none; transform:translate(10px,-50%); transition:opacity 180ms ease, transform 240ms cubic-bezier(.22,.75,.25,1), visibility 0s linear 240ms; }
.app-shell.is-chat-hidden .show-chat-button { visibility:visible; opacity:1; pointer-events:auto; transform:translate(0,-50%); transition-delay:120ms,120ms,0s; }
.show-chat-button:hover { border-color:#bfb7f5; background:#f8f7ff; }
.chat-history-dialog section { position:relative; display:grid; gap:13px; }
.chat-history-dialog h2 { margin:0 0 3px; }
.chat-history-list { display:grid; max-height:min(430px,60vh); gap:7px; overflow:auto; }
.chat-history-item { display:grid; grid-template-columns:minmax(0,1fr) 34px; align-items:stretch; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fff; }
.chat-history-item.is-active { border-color:#cfc9fb; background:#faf9ff; }
.chat-history-open { display:grid; min-width:0; gap:4px; padding:10px 11px; border:0; background:transparent; color:#4f586d; text-align:left; }
.chat-history-open strong,.chat-history-open span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-history-open strong { font-size:12px; }
.chat-history-open span { color:#9299aa; font-size:10px; }
.chat-history-delete { border:0; border-left:1px solid var(--line); background:transparent; color:#a0a7b7; font-size:18px; }
.chat-history-delete:hover { background:#fff1f2; color:#b75762; }

.calendar-section { margin-top: 54px; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.calendar-toolbar h2 { margin:0; font-size:22px; letter-spacing:-.04em; }
.calendar-actions { display:flex; gap:7px; }
.calendar-nav { display:grid; width:31px; height:31px; place-items:center; border:1px solid var(--line); border-radius:8px; background:#fff; color:#5f6880; font-size:20px; }
.calendar-week-labels,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-week-labels { padding:0 0 8px; color:#969db0; font-size:10px; text-align:center; }
.calendar-grid { overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#fff; }
.calendar-day { min-height:82px; padding:9px; border:0; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; color:#394157; text-align:left; }
.calendar-day:nth-child(7n) { border-right:0; }.calendar-day:nth-last-child(-n+7) { border-bottom:0; }
.calendar-day span { display:block; font:500 13px "DM Mono",monospace; }.calendar-day small { display:block; margin-top:9px; color:#7163dc; font-size:10px; }
.calendar-day:hover { background:#fafaff; }.calendar-day.is-outside { color:#c3c8d3; background:#fcfcfd; }.calendar-day.is-selected { background:#f4f2ff; box-shadow:inset 0 0 0 1px #dcd7fb; }.calendar-day.is-selected span { color:#6756e6; }
.calendar-detail { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-top:18px; padding:17px; border:1px solid var(--line); border-radius:12px; background:#fff; }.calendar-detail h3 { margin:0; font-size:15px; }.calendar-detail-tasks { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }.calendar-task-item,.calendar-empty { margin:0; color:#687187; font-size:11px; }.calendar-task-item { padding:7px 9px; border-radius:7px; background:#f1f0ff; color:#5d54a6; }.calendar-add-button { padding:7px 9px; border:1px solid #dfdbfb; border-radius:7px; background:#fff; color:#6659d8; font-size:11px; }
.calendar-task-dialog { width:min(420px,calc(100% - 35px)); }.calendar-task-dialog section { display:grid; gap:13px; position:relative; }.calendar-task-dialog h2 { margin:0; font-size:20px; }.calendar-task-dialog-list { display:grid; gap:8px; min-height:42px; }.calendar-task-dialog .calendar-task-item { margin:0; padding:10px; font-size:12px; }.calendar-task-dialog .calendar-add-button { justify-self:start; }
.week-navigator { display:flex; align-items:center; border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; }.week-navigator button { height:33px; border:0; background:#fff; color:#677085; font-size:12px; }.week-navigator button:hover { background:#fafaff; color:#5c50d2; }.week-navigator #previousWeek,.week-navigator #nextWeek { width:30px; font-size:19px; }.week-navigator #weekRangeButton { min-width:154px; border-right:1px solid var(--line); border-left:1px solid var(--line); padding:0 10px; }.week-picker label { display:grid; gap:6px; color:#626b7e; font-size:12px; }.week-picker input { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:8px; outline-color:var(--purple); }
@media (max-width:880px) { .calendar-day { min-height:72px; }.calendar-detail { display:block; }.calendar-detail-tasks { justify-content:flex-start; margin-top:13px; } }
@media (max-width:1360px) and (min-width:881px) {
  /* At this width a seven-day board needs priority over the auxiliary chat column. */
  .app-shell { --sidebar-column:76px; --chat-column:0px; grid-template-columns:var(--sidebar-column) minmax(0,1fr); }
  .app-shell.is-chat-hidden { --chat-column:0px; }
  .ai-panel { display:none; }
  .show-chat-button { display:none; }
  .sidebar { padding:24px 11px; }
  .brand { justify-content:center; padding:0; }
  .token-usage { justify-content:center; margin:10px 4px 0; padding:6px 3px; }
  .token-usage span { display:none; }
  .token-usage strong { max-width:50px; font-size:9px; }
  .sync-indicator { justify-content:center; margin:7px 4px 0; padding:6px 3px; }
  .sync-indicator span { display:none; }
  .sync-indicator strong { max-width:50px; font-size:9px; }
  .brand span:last-child,.nav-item { font-size:0; }
  .nav-item { justify-content:center; padding:12px; }
  .nav-item span { font-size:18px; }
  .sidebar-footer p { display:none; }
  .new-task { font-size:0; }
  .new-task span { margin:0; }
  .settings-button { min-height:38px; padding:9px 0; font-size:0; text-align:center; }
  .settings-button span { margin:0; font-size:12px; }
  .workspace { padding:36px clamp(22px,3.25vw,42px) 52px; }
  .week-section { margin-top:42px; }
  .day-column { padding:15px 9px 42px; }
  .day-tasks { margin-top:24px; }
}

@media (max-width:560px) {
  .data-dialog { padding:24px 20px; }
  .data-actions-local { grid-template-columns:1fr; }
}
@media (max-width:880px) { .app-shell { --sidebar-column:68px; --chat-column:0px; grid-template-columns:68px minmax(0,1fr); }.show-chat-button { display:none; } }
@media (min-width:621px) and (max-width:880px) {
  .settings-button { min-height:38px; padding:9px 0; font-size:0; text-align:center; }
  .settings-button span { display:block; margin:0; font-size:13px; }
}
@media (max-width:620px) {
  .sidebar {
    min-height:0;
    height:58px;
    gap:4px;
    padding:8px 10px;
  }
  .brand { width:38px; flex:0 0 38px; margin:0; padding:0; }
  .penguin { width:36px; height:36px; }
  .token-usage:not([hidden]) { width:42px; flex:0 0 42px; justify-content:center; margin:0; padding:6px 3px; }
  .token-usage span { display:none; }
  .token-usage strong { max-width:34px; font-size:8px; }
  .sync-indicator { display:none; }
  .nav-list { flex:0 0 auto; gap:2px; }
  .nav-item { width:38px; height:38px; padding:0; }
  .sidebar-footer { display:flex; align-items:center; gap:4px; margin:0 0 0 auto; }
  .new-task,
  .settings-button {
    display:grid;
    width:38px;
    height:38px;
    min-height:38px;
    place-items:center;
    margin:0;
    padding:0;
    border-radius:9px;
    font-size:0;
    text-align:center;
  }
  .new-task span { margin:0; font-size:18px; line-height:1; }
  .settings-button span { margin:0; font-size:13px; line-height:1; }
  .app-version { display:none; }
}
@media (max-width:1180px) { .day-column { height:490px; } }
@media (max-width:620px) { .day-column { height:470px; } }
@media (min-width:881px) and (max-width:1360px) { .day-column { height:clamp(320px,calc(100vh - 240px),360px); } .task-card { height:56px; min-height:56px; padding-top:8px; padding-bottom:8px; } .task-card p { font-size:10px; line-height:1.35; } .task-card time { font-size:9px; } }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
@media (max-width:520px) { .task-time-row,.task-date-range,.task-date-project-row { grid-template-columns:1fr; }.cross-date-row { align-items:stretch; flex-direction:column; }.date-range-button { width:100%; max-width:none; }.color-palette { grid-template-columns:repeat(5,1fr); } }
