:root {
  color-scheme: light;
  --page: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-soft: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --quiet: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --hairline: rgba(0, 0, 0, 0.05);
  --blue: #0071e3;
  --green: #248a3d;
  --red: #d70015;
  --amber: #a45b00;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
  --soft-shadow: 0 8px 26px rgba(0, 0, 0, 0.04);
  --radius: 14px;
  --radius-small: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: linear-gradient(180deg, #fff 0%, #fbfbfd 34%, var(--page) 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 95%;
  margin: 0 auto;
  padding: 44px 0 56px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 10px 4px 34px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 800;
  line-height: 0.94;
}

h2 {
  font-size: 21px;
  font-weight: 760;
  line-height: 1.18;
}

.date-pill,
.risk-meter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  backdrop-filter: blur(18px);
}

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.command-panel {
  position: relative;
  z-index: 20;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  overflow: visible;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(280px, 1.75fr) minmax(128px, 0.52fr) minmax(188px, 0.78fr) minmax(130px, 0.5fr) minmax(260px, 1.1fr) auto;
  gap: 12px;
  align-items: end;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
}

.field span:first-child,
.rail-title {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

input,
.fake-select,
.deadline-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input {
  padding: 0 14px;
}

input:focus,
.fake-select:focus-visible,
.deadline-trigger:focus-visible {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

input::placeholder {
  color: #a1a1a6;
}

input[type="time"],
input[type="date"] {
  appearance: none;
}

.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-strong);
}

.stepper input {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  text-align: center;
}

.icon-button,
.ghost-button,
.primary-button,
.fake-select,
.deadline-trigger,
.deadline-options button,
.deadline-time-options button,
.picker-popover button,
.task-card,
.rail-item,
.hour-slot {
  cursor: pointer;
}

.icon-button {
  border: 0;
  background: #f5f5f7;
  color: var(--text);
  font-size: 20px;
}

.fake-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.chevron {
  color: var(--quiet);
}

.deadline-field {
  z-index: 24;
}

.deadline-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
  color: var(--text);
  text-align: left;
}

.deadline-trigger .deadline-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.deadline-trigger strong,
.deadline-trigger small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-trigger strong {
  font-size: 15px;
  font-weight: 780;
}

.deadline-trigger small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.deadline-popover {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  left: 0;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.12);
}

.deadline-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.deadline-options button,
.deadline-time-options button {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  background: #f5f5f7;
  color: var(--text);
}

.deadline-options button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}

.deadline-options strong {
  font-size: 14px;
  line-height: 1.1;
}

.deadline-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deadline-time-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.deadline-time-options button {
  min-height: 38px;
  font-weight: 760;
}

.deadline-options button:hover,
.deadline-time-options button:hover {
  background: #fff;
}

.deadline-options button.active,
.deadline-time-options button.active {
  border-color: rgba(0, 113, 227, 0.34);
  background: #1d1d1f;
  color: #fff;
}

.deadline-options button.active span {
  color: rgba(255, 255, 255, 0.72);
}

.deadline-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-top: 4px;
}

.deadline-adjust-group {
  display: grid;
  gap: 6px;
}

.deadline-adjust-group > span {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

.deadline-adjust-row,
.deadline-time-adjust {
  display: grid;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
}

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

.deadline-time-adjust {
  grid-template-columns: 52px 52px minmax(0, 1fr) 52px 52px;
}

.deadline-adjust-row button,
.deadline-time-adjust button {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #f5f5f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.deadline-adjust-row button:hover,
.deadline-time-adjust button:hover {
  background: #ececf0;
  color: var(--text);
}

.deadline-adjust-row strong,
.deadline-time-adjust strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 780;
  white-space: nowrap;
}

.picker-popover {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.12);
}

.picker-popover button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.picker-popover button:hover {
  background: #f5f5f7;
}

.picker-popover button.active {
  background: #1d1d1f;
  color: #fff;
}

.primary-button,
.ghost-button {
  min-height: 48px;
  border-radius: var(--radius-small);
  border: 0;
  font-weight: 700;
}

.primary-button {
  padding: 0 22px;
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: #0077ed;
}

.ghost-button {
  padding: 0 14px;
  background: #f5f5f7;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sidebar-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.backlog-panel,
.planner-panel,
.warning-panel {
  padding: 18px;
}

.section-heading,
.planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.planner-header {
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f5f7;
}

.view-switch button {
  min-height: 30px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.view-switch button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.task-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.task-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 42px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f5f7;
}

.task-tabs button {
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.task-tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.task-tab-panel {
  min-height: 120px;
}

.task-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.035);
  touch-action: none;
  user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 4px;
  background: var(--task-color, var(--blue));
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.task-card.dragging-source {
  opacity: 0.36;
}

.task-card.done {
  background: #fbfdfb;
}

.task-card.overdue {
  border-color: rgba(215, 0, 21, 0.3);
}

.task-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-title {
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-meta,
.task-risk {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.task-recommendation {
  padding: 8px 10px;
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--task-color, var(--blue)) 8%, #fff);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.task-consequence {
  padding: 8px 10px;
  border-radius: var(--radius-small);
  background: rgba(215, 0, 21, 0.06);
  color: #7a271a;
  font-size: 12px;
  line-height: 1.45;
}

.priority-critical {
  background: rgba(215, 0, 21, 0.1);
  color: var(--red);
}

.priority-high {
  background: rgba(178, 95, 0, 0.1);
  color: var(--amber);
}

.priority-medium {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.priority-low {
  background: rgba(36, 138, 61, 0.1);
  color: var(--green);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-small);
  background: #f5f5f7;
  color: #515154;
  font-size: 12px;
  font-weight: 700;
}

button.chip {
  border: 0;
  cursor: pointer;
}

button.chip:hover,
button.chip:focus-visible {
  background: #ececf0;
  color: var(--text);
}

button.date-chip {
  border: 1px solid rgba(0, 113, 227, 0.12);
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
}

.chip.danger {
  background: rgba(215, 0, 21, 0.08);
  color: var(--red);
}

.chip.good {
  background: rgba(36, 138, 61, 0.1);
  color: var(--green);
}

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

.schedule-button,
.done-toggle,
.complete-button,
.delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-small);
  font-weight: 760;
}

.schedule-button {
  padding: 0 11px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.done-toggle {
  padding: 0 11px;
  background: #f5f5f7;
  color: var(--muted);
}

.done-toggle.active {
  background: rgba(36, 138, 61, 0.1);
  color: var(--green);
}

.delete-button {
  width: 34px;
  background: #fff2f4;
  color: var(--red);
}

.complete-button {
  width: 34px;
  background: rgba(36, 138, 61, 0.1);
  color: var(--green);
}

.empty-state {
  display: none;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state.visible {
  display: block;
}

.completed-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.completed-heading h2 {
  font-size: 18px;
}

.completed-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.completed-group {
  display: grid;
  gap: 8px;
}

.completed-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.completed-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 16px;
  border: 1px solid color-mix(in srgb, var(--task-color, var(--green)) 18%, var(--hairline));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--task-color, var(--green)) 7%, #fff);
}

.completed-card::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 4px;
  background: var(--task-color, var(--green));
}

.completed-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.completed-card strong,
.completed-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-card span {
  color: var(--muted);
  font-size: 12px;
}

.planner-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.execution-card {
  display: grid;
  gap: 10px;
}

.execution-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 16px 16px 20px;
  border: 1px solid color-mix(in srgb, var(--task-color, var(--blue)) 22%, var(--hairline));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--task-color, var(--blue)) 7%, #fff);
}

.execution-main::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 4px;
  border-radius: 4px;
  background: var(--task-color, var(--blue));
}

.execution-main h2 {
  margin-bottom: 6px;
}

.execution-main span,
.execution-main small,
.execution-next,
.execution-empty span {
  color: var(--muted);
  line-height: 1.45;
}

.execution-main small {
  display: block;
  margin-top: 5px;
}

.execution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.execution-next,
.execution-empty {
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
}

.execution-empty {
  display: grid;
  gap: 4px;
}


.date-selectors {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.date-picker {
  min-width: 0;
}

.date-popover {
  max-height: 288px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.timeline-board {
  display: grid;
  gap: 8px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.timeline-row.occupied {
  background: color-mix(in srgb, var(--slot-color, var(--blue)) 7%, #fff);
  border-color: color-mix(in srgb, var(--slot-color, var(--blue)) 24%, var(--hairline));
}

.timeline-time {
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.timeline-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.timeline-empty {
  align-self: center;
  color: #a1a1a6;
  font-size: 12px;
}

.hours-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  grid-auto-rows: minmax(94px, auto);
  gap: 10px;
}

.hour-slot.occupied {
  background: color-mix(in srgb, var(--slot-color, var(--blue)) 7%, #fff);
  border-color: color-mix(in srgb, var(--slot-color, var(--blue)) 24%, var(--hairline));
}

.gantt-board {
  display: grid;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.gantt-axis,
.gantt-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(640px, 1fr);
  gap: 12px;
  align-items: center;
}

.gantt-axis {
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.gantt-ticks,
.gantt-track {
  position: relative;
}

.gantt-ticks {
  height: 24px;
  border-bottom: 1px solid var(--hairline);
}

.gantt-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-1px);
  white-space: nowrap;
}

.gantt-row {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.gantt-row.overdue {
  border-color: rgba(215, 0, 21, 0.18);
}

.gantt-row.done {
  background: #fbfdfb;
}

.gantt-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gantt-name strong,
.gantt-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-name strong {
  font-size: 14px;
}

.gantt-name span {
  color: var(--muted);
  font-size: 12px;
}

.gantt-track {
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 24 - 1px), rgba(0, 0, 0, 0.035) calc(100% / 24 - 1px), rgba(0, 0, 0, 0.035) calc(100% / 24));
}

.gantt-bar {
  position: absolute;
  top: 5px;
  bottom: 5px;
  display: flex;
  align-items: center;
  min-width: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--task-color, var(--blue));
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
}

.gantt-bar.danger {
  outline: 2px solid rgba(215, 0, 21, 0.42);
  outline-offset: 1px;
}

.gantt-bar.done {
  opacity: 0.68;
}

.gantt-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.hour-slot {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.continuation-chip {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--task-color, var(--blue)) 24%, var(--hairline));
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--task-color, var(--blue)) 9%, #fff);
  color: var(--text);
}

.continuation-chip span,
.continuation-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.continuation-chip strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-color-blue {
  --task-color: #0071e3;
  --slot-color: #0071e3;
}

.task-color-green {
  --task-color: #248a3d;
  --slot-color: #248a3d;
}

.task-color-orange {
  --task-color: #b25f00;
  --slot-color: #b25f00;
}

.task-color-pink {
  --task-color: #d70070;
  --slot-color: #d70070;
}

.task-color-purple {
  --task-color: #7d5fff;
  --slot-color: #7d5fff;
}

.task-color-teal {
  --task-color: #008c95;
  --slot-color: #008c95;
}

.hour-slot.drop-ready {
  border-color: rgba(0, 113, 227, 0.48);
  background: #f5faff;
  transform: translateY(-1px);
}

.hour-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.hour-load {
  color: #a1a1a6;
  font-weight: 700;
}

.slot-tasks {
  display: grid;
  gap: 7px;
  align-content: start;
}

.slot-tasks .task-card {
  padding: 10px;
  gap: 7px;
  box-shadow: none;
}

.slot-tasks .task-actions {
  margin-top: 1px;
}

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--green);
}

.risk-meter.warning .risk-dot {
  background: var(--amber);
}

.risk-meter.danger .risk-dot {
  background: var(--red);
}

.warning-panel {
  margin-top: 0;
}

.heat-panel {
  margin-top: 16px;
  padding: 18px;
}

.week-heat {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.heat-day {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.heat-day span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.heat-day strong {
  font-size: 24px;
  line-height: 1;
}

.heat-day small {
  color: var(--muted);
  font-size: 12px;
}

.heat-day.active {
  border-color: rgba(0, 113, 227, 0.5);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.heat-empty {
  background: #fff;
}

.heat-low {
  background: #f3fbf7;
}

.heat-medium {
  background: #fff9eb;
}

.heat-high {
  background: #fff1e8;
}

.heat-critical {
  background: #fff0f3;
  border-color: rgba(215, 0, 21, 0.18);
}

.warning-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.warning-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(215, 0, 21, 0.12);
  border-radius: var(--radius);
  background: #fff;
  color: #5c2b00;
  line-height: 1.48;
}

.warning-action {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-small);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-weight: 760;
}

.warning-item strong {
  color: var(--red);
}

.warning-item.safe {
  border-color: rgba(36, 138, 61, 0.14);
  background: #fff;
  color: var(--green);
}

.drag-layer {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: min(320px, calc(100vw - 28px));
  pointer-events: none;
  transform: translate3d(-9999px, -9999px, 0);
}

.drag-layer .task-card {
  transform: rotate(0.6deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

@media (max-width: 1120px) {
  .task-form {
    grid-template-columns: 1fr 1fr;
  }

  .wide-field,
  .consequence-field {
    grid-column: span 2;
  }

  .task-form > .primary-button {
    grid-column: span 2;
  }

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

}

@media (max-width: 760px) {
  .app-shell {
    width: 95%;
    padding-top: 24px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 26px;
  }

  h1 {
    font-size: 48px;
  }

  .command-panel .task-form,
  .task-form,
  .planner-body,
  .week-heat {
    grid-template-columns: minmax(0, 1fr);
  }

  .wide-field,
  .deadline-field,
  .consequence-field,
  .task-form > .primary-button,
  .primary-button {
    grid-column: 1 / -1;
  }

  .deadline-popover {
    width: 100%;
  }

  .deadline-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deadline-time-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .execution-main {
    grid-template-columns: 1fr;
  }

  .execution-actions {
    justify-content: stretch;
  }

  .execution-actions button {
    flex: 1;
  }

  .planner-header,
  .section-heading {
    align-items: flex-start;
  }

  .panel-actions {
    width: 100%;
    justify-content: stretch;
  }

  .panel-actions .ghost-button {
    flex: 1;
  }

  .view-switch {
    width: 100%;
  }

  .date-selectors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hours-board {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(86px, auto);
  }

  .gantt-axis,
  .gantt-row {
    grid-template-columns: minmax(150px, 190px) minmax(560px, 1fr);
  }
}

@media (max-width: 460px) {
  .app-shell {
    width: 95%;
  }

  h1 {
    font-size: 42px;
  }

  .command-panel,
  .backlog-panel,
  .planner-panel,
  .heat-panel,
  .warning-panel {
    padding: 14px;
  }

  .date-pill,
  .risk-meter {
    width: 100%;
  }
}
