:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --panel-alt: #f1f4f5;
  --line: #dce2e4;
  --line-strong: #c7d0d4;
  --text: #172126;
  --muted: #68767d;
  --blue: #2f6db5;
  --saturday: #1f65c2;
  --sunday: #d13c3c;
  --green: #2f9866;
  --orange: #c17a28;
  --red: #d24b44;
  --violet: #7f5bb7;
  --amber: #c58a1a;
  --today: #f1cd4f;
  --left-width: 260px;
  --title-width: 120px;
  --date-width: 56px;
  --row-height: 22px;
  --header-height: 38px;
  --radius: 8px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
}

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

button {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: #9fb0b8;
  background: #f8fafb;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 62px minmax(0, 1fr);
}

.assistant-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 24;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.assistant-toggle,
.assistant-panel {
  pointer-events: auto;
}

.assistant-toggle {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border-color: #9cb8c7;
  border-radius: 999px;
  background: #23333a;
  color: #fff;
  box-shadow: 0 10px 26px rgba(23, 33, 38, 0.22);
  font-size: 12px;
  font-weight: 850;
}

.assistant-toggle::after {
  position: absolute;
  right: 7px;
  bottom: 3px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #9cb8c7;
  border-bottom: 1px solid #9cb8c7;
  background: #23333a;
  content: "";
  transform: rotate(35deg);
}

.assistant-toggle:hover {
  border-color: #7ea6bc;
  background: #2f4650;
}

.assistant-panel {
  display: flex;
  width: min(360px, calc(100vw - 32px));
  max-height: min(460px, calc(100vh - 110px));
  min-height: 320px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 38, 0.16);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 56px rgba(23, 33, 38, 0.26);
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
}

.assistant-header div {
  display: grid;
  gap: 2px;
}

.assistant-header strong {
  font-size: 13px;
  font-weight: 800;
}

.assistant-header span {
  color: var(--muted);
  font-size: 11px;
}

.assistant-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
  background: #fbfcfc;
}

.assistant-message {
  max-width: 88%;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-line;
}

.assistant-message.is-user {
  align-self: flex-end;
  background: #2f6db5;
  color: #fff;
}

.assistant-message.is-assistant {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.assistant-form textarea {
  min-height: 50px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.assistant-form button {
  align-self: end;
  min-height: 32px;
  padding: 0 11px;
}

.assistant-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 27, 31, 0.34);
}

.assistant-confirm-dialog {
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 38, 0.16);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 20px 70px rgba(23, 33, 38, 0.28);
}

.assistant-confirm-header {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
}

.assistant-confirm-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.assistant-confirm-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.assistant-confirm-body {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.assistant-confirm-prompt {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.assistant-confirm-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.35;
}

.assistant-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.brand-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.brand-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0;
}

.storage-badge {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.sidebar-toggle {
  display: inline-grid;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-section {
  padding: 14px 10px 6px;
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs button {
  min-width: 0;
  padding: 7px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.workspace-tabs button:hover,
.workspace-tabs button.is-active {
  background: #eaf0f2;
  color: var(--text);
}

.section-label {
  margin: 0 6px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.nav-item {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: #eaf0f2;
}

.nav-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.25;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-short {
  display: none;
}

.nav-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.sidebar.is-collapsed {
  overflow-x: hidden;
}

.sidebar.is-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.sidebar.is-collapsed .brand-main,
.sidebar.is-collapsed .workspace-tabs,
.sidebar.is-collapsed .section-label,
.sidebar.is-collapsed .project-section,
.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .nav-meta {
  display: none;
}

.sidebar.is-collapsed .view-section {
  padding: 10px 6px;
}

.sidebar.is-collapsed .nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
}

.sidebar.is-collapsed .nav-title {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  text-align: center;
}

.sidebar.is-collapsed .nav-short {
  display: inline;
}

.sidebar.is-collapsed .nav-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.main {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.topbar-title {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 780;
}

.topbar p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.auth-controls {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.auth-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #c7d0d4;
  border-radius: 999px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

button.auth-chip {
  cursor: pointer;
}

.auth-chip.is-synced {
  border-color: #b8d3c5;
  background: #eef7f1;
  color: #2f7650;
}

.auth-chip.is-syncing,
.auth-chip.is-pending {
  border-color: #d7c98f;
  background: #fff8df;
  color: #806c1f;
}

.auth-chip.is-error {
  border-color: #e3b0ac;
  background: #fff0ef;
  color: #a13f3a;
}

.auth-chip.is-local {
  border-color: #cfd8dc;
  background: #f4f6f7;
}

.auth-user {
  display: inline-block;
  max-width: 112px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-input {
  display: none;
}

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

.io-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 15;
  display: none;
  min-width: 132px;
  padding: 5px;
  border: 1px solid rgba(23, 33, 38, 0.14);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 33, 38, 0.16);
}

.io-menu.is-open .io-menu-panel {
  display: grid;
  gap: 3px;
}

.io-menu-panel button {
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 680;
}

.io-menu-panel button:hover {
  background: #eef5f8;
}

.button-primary {
  border-color: #2568a9;
  background: #2f6db5;
  color: #fff;
  font-weight: 720;
}

.button-primary:hover {
  border-color: #1f5a96;
  background: #255f9f;
}

.button-danger {
  border-color: #e2b7b5;
  color: #b93430;
}

.button-small {
  min-width: 28px;
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}

.icon-button {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.segmented button {
  min-width: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: #23333a;
  color: #fff;
}

.scale-control {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.scale-step,
.scale-unit {
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
}

.scale-step {
  width: 54px;
  padding: 0 4px 0 9px;
  border-right: 1px solid var(--line);
  text-align: right;
}

.scale-unit {
  width: 50px;
  padding: 0 7px;
}

.summary-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafdff;
  color: var(--muted);
  font-size: 12px;
}

.summary-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.summary-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.travel-status-button.is-active,
.hide-completed-button.is-active {
  border-color: #6fa08b;
  background: #eaf7f1;
  color: #25714d;
}

.today-button {
  border-color: #bfd3df;
  background: #fff;
  color: var(--blue);
}

.today-button:hover {
  border-color: #8eb1c8;
  background: #edf6fb;
}

.status-message {
  max-width: 360px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid #d4dfd8;
  border-radius: 999px;
  background: #f2faf4;
  color: #356346;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 16px;
  height: 8px;
  border-radius: 3px;
}

.legend-diamond {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: rotate(45deg);
}

.legend-plane {
  display: inline-grid;
  width: 16px;
  height: 12px;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.legend-plane.is-departure {
  transform: rotate(-24deg);
}

.legend-plane.is-arrival {
  transform: rotate(24deg);
}

.chart-wrap {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 12px 14px 14px;
}

.workspace-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 14px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #edf1f2;
}

.team-card h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 780;
}

.team-card-title {
  min-width: 0;
}

.team-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.team-card-head span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef5f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.team-card-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.team-note {
  padding: 0 12px;
}

.travel-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
}

.travel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f7fafb;
}

.travel-item > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.travel-item strong {
  font-size: 12px;
}

.travel-item span,
.travel-item.is-empty {
  color: var(--muted);
  font-size: 11px;
}

.travel-item-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
}

.button-danger-soft {
  border-color: #e4b7b4;
  background: #fff6f5;
  color: #a33b36;
}

.placeholder-panel {
  display: grid;
  gap: 4px;
  max-width: 360px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.placeholder-panel strong {
  font-size: 15px;
}

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

.settings-panel {
  display: grid;
  max-width: 720px;
  gap: 12px;
}

.settings-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settings-section-head {
  display: grid;
  gap: 4px;
}

.settings-section-head strong {
  font-size: 15px;
  font-weight: 820;
}

.settings-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.theme-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-preview span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafbfb;
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.theme-preview i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}

.chart-frame {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.chart-viewport {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #fff;
}

.chart-x-scroll {
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
}

.chart-x-scroll-inner {
  width: var(--chart-total-width);
  height: 1px;
}

.chart-grid {
  display: grid;
  grid-template-columns: var(--left-width) var(--timeline-width);
  min-width: calc(var(--left-width) + var(--timeline-width));
}

.left-header,
.timeline-header {
  position: sticky;
  top: 0;
  z-index: 6;
  height: var(--header-height);
  border-bottom: 1px solid var(--line-strong);
  background: #eef3f5;
}

.left-header {
  left: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: var(--title-width) var(--date-width) var(--date-width);
  align-items: center;
  gap: 8px;
  width: var(--left-width);
  padding: 0 10px;
  border-right: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.timeline-header {
  overflow: hidden;
}

.periods {
  position: relative;
  display: flex;
  width: var(--timeline-width);
  height: var(--header-height);
}

.period-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--unit-width);
  min-width: var(--unit-width);
  border-right: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
}

.period-header.is-saturday {
  color: var(--saturday);
  background: #eaf3ff;
}

.period-header.is-sunday {
  color: var(--sunday);
  background: #fff0f0;
}

.weekend-head-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.weekend-head-mark.is-saturday {
  border-top: 3px solid var(--saturday);
  background: rgba(47, 109, 181, 0.05);
}

.weekend-head-mark.is-sunday {
  border-top: 3px solid var(--sunday);
  background: rgba(210, 75, 68, 0.05);
}

.left-cell,
.timeline-cell {
  height: var(--row-height);
  border-bottom: 1px solid #edf1f2;
}

.left-cell {
  position: sticky;
  left: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: var(--title-width) var(--date-width) var(--date-width);
  align-items: center;
  gap: 8px;
  width: var(--left-width);
  padding: 0 8px 0 10px;
  border-right: 1px solid var(--line-strong);
  background: #fff;
  font-size: 11px;
}

.left-cell.is-project {
  background: #eff6fb;
  font-weight: 760;
}

.left-cell.is-group {
  background: #f6fbff;
  font-weight: 760;
}

.left-cell.is-travel {
  background: #edf7f2;
  cursor: pointer;
  font-weight: 760;
}

.left-cell.is-milestone {
  background: #fbfaf2;
}

.left-cell.is-done .title-text {
  color: var(--muted);
  text-decoration: line-through;
}

.left-cell.is-done .color-pill {
  background: #9aa6ab !important;
}

.left-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  padding-left: calc(var(--tree-level, 0) * 14px);
}

.title-button {
  display: flex;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  text-align: left;
}

.title-button[data-draggable-task="true"] {
  cursor: grab;
  touch-action: manipulation;
}

.title-button.is-drag-source {
  color: var(--muted);
  cursor: grabbing;
  opacity: 0.42;
}

.title-button:hover {
  border-color: transparent;
  background: transparent;
}

.title-button:hover .title-text {
  color: var(--blue);
}

.title-button:focus-visible {
  outline: 2px solid rgba(47, 109, 181, 0.35);
  outline-offset: 2px;
}

.done-toggle {
  display: inline-grid;
  width: 14px;
  height: 14px;
  min-width: 14px;
  padding: 0;
  place-items: center;
  border: 1px solid #b7c4ca;
  border-radius: 3px;
  background: #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.done-toggle:hover {
  border-color: #5f879b;
}

.done-toggle.is-checked {
  border-color: #2f9866;
  background: #2f9866;
}

.collapse-marker {
  display: inline-grid;
  width: 11px;
  min-width: 11px;
  height: 14px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.collapse-marker:hover {
  background: transparent;
}

.collapse-marker:focus-visible {
  outline: 2px solid rgba(47, 109, 181, 0.35);
  outline-offset: 1px;
}

.collapse-marker.is-collapsed .color-pill {
  opacity: 0.55;
}

.title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-text {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.color-pill {
  width: 7px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 3px;
}

body.is-task-dragging {
  cursor: grabbing;
  user-select: none;
}

.task-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 42;
  max-width: min(320px, calc(100vw - 28px));
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(47, 109, 181, 0.35);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(23, 33, 38, 0.24);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-drag-ghost.is-invalid {
  border-color: rgba(210, 75, 68, 0.35);
  color: var(--muted);
}

.task-drop-indicator {
  position: fixed;
  z-index: 41;
  pointer-events: none;
}

.task-drop-indicator.is-hidden {
  display: none;
}

.task-drop-indicator.is-line {
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 109, 181, 0.18);
}

.task-drop-indicator.is-line::before,
.task-drop-indicator.is-line::after {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.task-drop-indicator.is-line::before {
  left: -2px;
}

.task-drop-indicator.is-line::after {
  right: -2px;
}

.task-drop-indicator.is-inside {
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 0 8px;
  border: 1px dashed rgba(47, 109, 181, 0.75);
  border-radius: 5px;
  background: rgba(47, 109, 181, 0.09);
  color: #23548c;
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-diamond {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 2px;
  transform: rotate(45deg);
}

.travel-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2f9866;
}

.timeline-cell {
  position: relative;
  width: var(--timeline-width);
  background-color: #fff;
  background-image: linear-gradient(
    to right,
    transparent calc(var(--unit-width) - 1px),
    rgba(104, 118, 125, 0.18) calc(var(--unit-width) - 1px),
    rgba(104, 118, 125, 0.18) var(--unit-width)
  );
  background-size: var(--unit-width) 100%;
}

.timeline-cell.is-project {
  background-color: #f7fbff;
}

.timeline-cell.is-travel {
  background-color: #f6fbf8;
  cursor: pointer;
}

.timeline-cell.is-travel:hover {
  background-color: #eef8f3;
}

.timeline-cell.is-add {
  background-color: #fafdfb;
}

.nonworking {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(82, 93, 99, 0.09);
  pointer-events: none;
}

.timeline-bar {
  position: absolute;
  top: 5px;
  z-index: 1;
  height: 12px;
  min-width: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.timeline-bar:hover {
  filter: brightness(0.95);
}

.timeline-bar.is-done {
  opacity: 0.42;
}

.travel-bar {
  position: absolute;
  top: 4px;
  z-index: 2;
  height: 14px;
  overflow: hidden;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.travel-bar:hover {
  filter: brightness(0.94);
}

.milestone-hit {
  position: absolute;
  top: 0;
  z-index: 4;
  width: 20px;
  height: var(--row-height);
  transform: translateX(-50%);
  cursor: pointer;
}

.milestone-marker {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(23, 33, 38, 0.28);
}

.milestone-marker.is-plane {
  top: 3px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(23, 33, 38, 0.28);
}

.milestone-marker.is-departure {
  transform: translateX(-50%) rotate(-24deg);
}

.milestone-marker.is-arrival {
  transform: translateX(-50%) rotate(24deg);
}

.milestone-count {
  position: absolute;
  top: -1px;
  left: 50%;
  z-index: 2;
  display: grid;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  transform: translateX(2px);
  place-items: center;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #23333a;
  color: #fff;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}

.milestone-popover {
  position: absolute;
  top: 19px;
  left: 50%;
  z-index: 20;
  display: none;
  width: max-content;
  min-width: 172px;
  max-width: 280px;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
  transform: translateX(-50%);
  border: 1px solid rgba(23, 33, 38, 0.16);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 33, 38, 0.18);
  color: var(--text);
  text-align: left;
}

.milestone-hit:hover .milestone-popover,
.milestone-hit.is-active .milestone-popover,
.milestone-hit:focus-within .milestone-popover {
  display: flex;
}

.milestone-popover:hover {
  border-color: rgba(47, 109, 181, 0.38);
  background: #fff;
}

.milestone-popover-item {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 6px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.milestone-popover-item:hover {
  border-color: transparent;
  background: #eef5f8;
}

.milestone-hit.has-multiple .milestone-popover-item + .milestone-popover-item {
  border-top: 1px solid #edf1f2;
  border-radius: 0;
}

.milestone-popover-meta {
  font-size: 10px;
  font-weight: 820;
  line-height: 1.2;
}

.milestone-popover-title,
.milestone-popover-memo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.milestone-popover-title {
  font-size: 12px;
  font-weight: 780;
  line-height: 1.25;
}

.milestone-popover-memo {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
  line-height: 1.25;
}

.today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 2px;
  transform: translateX(-1px);
  background: var(--today);
  pointer-events: none;
}

.today-label {
  position: absolute;
  top: 5px;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--today);
  color: #2e2a16;
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.empty-state {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 27, 31, 0.38);
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 20px 70px rgba(23, 33, 38, 0.28);
}

.modal-wide {
  width: min(880px, 100%);
}

.auth-modal {
  width: min(430px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 780;
}

.modal form {
  padding: 14px 16px 16px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 12px 16px 0;
}

.auth-mode-tabs button {
  min-height: 32px;
  border: 0;
  background: #eef3f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.auth-mode-tabs button.is-active {
  background: #23333a;
  color: #fff;
}

.auth-help,
.auth-error,
.auth-success {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.auth-help {
  color: var(--muted);
}

.auth-error {
  padding: 8px 9px;
  border: 1px solid #e3b0ac;
  border-radius: 6px;
  background: #fff0ef;
  color: #a13f3a;
  font-weight: 720;
}

.auth-success {
  padding: 8px 9px;
  border: 1px solid #b8d3c5;
  border-radius: 6px;
  background: #eef7f1;
  color: #2f7650;
  font-weight: 720;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.form-field.is-wide {
  grid-column: 1 / -1;
}

.form-field label,
.weekday-group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 730;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
  color: var(--text);
}

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

.modal-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-travel {
  max-width: 520px;
}

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

.country-field {
  position: relative;
}

.country-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.country-suggestion {
  min-height: 24px;
  padding: 0 8px;
  border-color: #cbd9df;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 720;
}

.country-suggestion:hover {
  border-color: #8eb2c4;
  background: #eef7fb;
}

.country-suggestion-empty {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
}

.travel-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
}

.travel-editor-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.travel-editor-title strong {
  color: var(--text);
  font-size: 13px;
}

.travel-editor-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.25fr) 130px 130px minmax(120px, 1fr) 58px;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e4eaed;
  border-radius: 7px;
  background: #fff;
}

.travel-editor-row .form-field.is-wide {
  grid-column: 1 / 5;
}

.travel-editor-row.is-new {
  border-style: dashed;
}

.travel-delete {
  justify-content: center;
  align-self: end;
}

.travel-row-spacer {
  display: block;
}

.weekday-grid,
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfb;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .travel-editor-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .travel-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .travel-editor-row .form-field.is-wide,
  .travel-delete,
  .travel-row-spacer {
    grid-column: 1 / -1;
  }

  .travel-delete {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  :root {
    --date-width: 54px;
  }
}
