:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --paper: #ffffff;
  --paper-muted: #fbfaf8;
  --ink: #2f2f2b;
  --muted: #78746c;
  --line: #e7e1d8;
  --line-strong: #d3cabe;
  --accent: #37352f;
  --accent-soft: #eee9df;
  --green: #dce9d3;
  --green-ink: #356143;
  --blue: #d7e6f6;
  --blue-ink: #285b89;
  --purple: #e5ddf2;
  --purple-ink: #604b82;
  --rose: #f2dedc;
  --rose-ink: #93433f;
  --teal: #d4e8e9;
  --teal-ink: #2b6469;
  --soft: #eef0e8;
  --soft-ink: #656a56;
  --gray: #e8e6e1;
  --gray-ink: #6d6961;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(55, 53, 47, 0.08);
  --left-width: clamp(568px, 46vw, 650px);
  --timeline-width: 1200px;
  --day-width: 54px;
  --row-height: 46px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: #9c9285;
  box-shadow: 0 0 0 3px rgba(55, 53, 47, 0.12);
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: #f1efe9;
}

.workspace-brand {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.workspace-brand strong,
.workspace-brand small {
  display: block;
}

.workspace-brand small,
.side-panel p,
.eyebrow,
label span,
.overview-card span,
.board-card span,
.board-card small,
.subtask-item small,
.empty-text {
  color: var(--muted);
}

.workspace-brand small {
  margin-top: 2px;
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.side-link,
.text-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font-weight: 750;
}

.side-link {
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.side-link.active,
.side-link:hover,
.external-link:hover,
.text-button:hover,
.text-button.active {
  border-color: var(--line);
  background: var(--paper);
}

.external-link {
  justify-content: space-between;
}

.external-link::after {
  content: "↗";
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.side-panel {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.side-panel p {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
}

.text-button {
  padding: 0 8px;
}

.workspace {
  min-width: 0;
  padding: 22px 24px 32px;
}

.workspace-header {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 560px);
  gap: 20px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.14;
  letter-spacing: 0;
}

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

.header-actions .search-box {
  flex: 1 1 190px;
  min-width: 160px;
}

.header-actions button,
.header-actions .sync-status {
  white-space: nowrap;
}

#notifyButton.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.search-box,
.compact-field,
.dialog-form label,
.detail-section label {
  display: grid;
  gap: 6px;
}

label span {
  font-size: 12px;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.danger-button,
.segment,
.icon-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
}

.primary-button {
  padding: 0 14px;
  background: var(--accent);
  color: white;
}

.secondary-button {
  padding: 0 12px;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  white-space: nowrap;
}

.danger-button {
  padding: 0 12px;
  border-color: #e6c6c3;
  background: #fff7f6;
  color: var(--rose-ink);
  white-space: nowrap;
}

.secondary-button:hover,
.secondary-button.active,
.segment.active,
.segment:hover,
.icon-button:hover {
  background: var(--accent-soft);
}

.danger-button:hover {
  background: var(--rose);
}

.kakao-share-button {
  border-color: #f3dd4a;
  background: #fee500;
  color: #2f2f2b;
}

.kakao-share-button:hover {
  background: #f7dd00;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sync-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--gray-ink);
}

.sync-status[data-sync-status="synced"]::before {
  background: var(--green-ink);
}

.sync-status[data-sync-status="syncing"]::before,
.sync-status[data-sync-status="connecting"]::before {
  background: var(--blue-ink);
}

.sync-status[data-sync-status="error"]::before {
  background: var(--rose-ink);
}

.share-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.share-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.full {
  width: 100%;
}

.form-actions,
.detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions {
  justify-content: end;
}

.form-actions .primary-button,
.form-actions .secondary-button {
  flex: 1 1 150px;
}

.detail-header-actions {
  justify-content: end;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.icon-button.small {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.overview-card,
.toolbar,
.schedule-shell,
.database-table-wrap,
.board-column,
.detail-drawer,
.task-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.overview-card {
  padding: 14px;
}

.overview-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.overview-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
}

.segmented-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-muted);
}

.segment {
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
}

.compact-field {
  width: 132px;
}

.property-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
}

.property-toggles label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.property-toggles input {
  width: auto;
  min-height: 0;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-gate[hidden] {
  display: none;
}

.login-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(340px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 30px 24px;
  text-align: center;
}

.login-card h2 {
  margin: 0;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-card input[type="password"] {
  width: 100%;
  text-align: center;
}

.login-card .primary-button {
  width: 100%;
}

.login-error {
  color: #b23b3b !important;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.filter-bar label {
  display: grid;
  gap: 4px;
  flex: 1 1 150px;
  max-width: 220px;
  min-width: 0;
}

.filter-bar label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-bar select {
  width: 100%;
  min-width: 0;
}

.filter-bar select.filter-active {
  border-color: var(--ink);
  font-weight: 800;
}

.filter-bar .text-button {
  margin-left: auto;
  min-height: 36px;
}

.view-panel {
  margin-top: 10px;
}

.view-panel[hidden] {
  display: none;
}

.schedule-shell {
  max-height: calc(100vh - 246px);
  overflow: auto;
}

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

.sticky-left {
  position: sticky;
  left: 0;
  z-index: 4;
}

.meta-head,
.date-head {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 48px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.meta-head {
  display: grid;
  align-items: center;
  gap: 0;
  z-index: 9;
  width: var(--left-width);
  overflow: hidden;
  border-right: 1px solid var(--line-strong);
}

.date-head {
  z-index: 6;
}

.meta-head span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.date-head {
  display: grid;
  grid-template-columns: repeat(var(--date-count), var(--day-width));
}

.date-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.date-cell span {
  font-weight: 850;
}

.date-cell strong {
  font-size: 12px;
  color: var(--ink);
}

.date-cell.weekend {
  background: #faf6f0;
}

.date-cell.today {
  background: #eee9df;
  color: var(--accent);
}

.group-row,
.group-track {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  background: #f6f3ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.group-row {
  display: flex;
  align-items: center;
  z-index: 5;
  padding: 0 12px;
  border-right: 1px solid var(--line-strong);
}

.group-track {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.task-meta,
.task-lane {
  min-height: var(--row-height);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.task-meta {
  display: grid;
  align-items: stretch;
  z-index: 5;
  width: var(--left-width);
  overflow: hidden;
  padding: 0;
  border-right: 1px solid var(--line-strong);
  text-align: left;
}

.task-meta > span,
.task-meta > strong {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta > .content-cell {
  display: grid;
  align-content: center;
  gap: 2px;
  white-space: normal;
}

.content-cell > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta strong {
  font-weight: 900;
}

.muted,
.memo-cell {
  color: var(--muted);
}

.task-meta.selected,
.task-lane.selected {
  background: #fffdf8;
}

.task-lane {
  position: relative;
  display: block;
  min-width: var(--timeline-width);
  overflow: hidden;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: var(--day-width) 100%;
}

.task-lane:hover,
.task-meta:hover {
  background-color: #fbfaf7;
}

.timeline-bar,
.today-line {
  position: absolute;
  top: 9px;
  left: calc(var(--start) * var(--day-width) + 4px);
}

.timeline-bar {
  display: flex;
  align-items: center;
  width: calc(var(--span) * var(--day-width) - 8px);
  min-width: 22px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(47, 47, 43, 0.08);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-bar.kind-personal {
  background: #f4e2ea;
  color: #824461;
}

.today-line {
  z-index: 1;
  width: 2px;
  height: calc(var(--row-height) - 8px);
  background: #b65d50;
}

.green {
  background: var(--green);
  color: var(--green-ink);
}

.blue {
  background: var(--blue);
  color: var(--blue-ink);
}

.purple {
  background: var(--purple);
  color: var(--purple-ink);
}

.rose {
  background: var(--rose);
  color: var(--rose-ink);
}

.teal {
  background: var(--teal);
  color: var(--teal-ink);
}

.soft {
  background: var(--soft);
  color: var(--soft-ink);
}

.gray {
  background: var(--gray);
  color: var(--gray-ink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.mini {
  min-height: 18px;
  margin-right: 5px;
  padding: 0 6px;
  font-size: 10px;
}

.inline-status-select {
  width: auto;
  min-width: 86px;
  min-height: 30px;
  border-color: transparent;
  border-radius: 999px;
  padding: 4px 28px 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.table-status-select {
  width: 96px;
}

.kind-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.kind-pill.kind-work {
  background: #e7ecf1;
  color: #40566f;
}

.kind-pill.kind-personal {
  background: #f4e2ea;
  color: #824461;
}

.kind-pill.compact {
  min-height: 18px;
  margin-right: 5px;
  padding: 0 6px;
  font-size: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.tag-chip,
.tag-empty {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 18px;
  border-radius: 999px;
  padding: 0 6px;
  background: #f3f1ec;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.tag-empty {
  background: transparent;
  padding: 0;
}

.calendar-view-button,
.calendar-open-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.calendar-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #e2b7af;
  border-radius: 5px;
  background: #fff7f6;
  color: #d85745;
  font-size: 11px;
  font-weight: 950;
}

.calendar-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: auto;
}

.calendar-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-muted);
}

.calendar-mode {
  display: grid;
  gap: 4px;
  width: 96px;
}

.calendar-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.calendar-controls strong {
  min-width: 102px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
}

.calendar-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-weekday.sun {
  color: #c25454;
}

.calendar-weekday.sat {
  color: #4a72b8;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
  min-width: 0;
  min-height: 92px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  padding: 5px 4px;
  text-align: left;
  cursor: pointer;
}

.calendar-day:nth-child(7n + 1) {
  border-left: 0;
}

.calendar-day.outside {
  background: #faf8f4;
}

.calendar-day.outside .day-num {
  opacity: 0.38;
}

.calendar-day:hover {
  background: #fffdf8;
}

.calendar-day.selected {
  background: #fdf7ea;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.calendar-day .day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.calendar-day.sun .day-num {
  color: #c25454;
}

.calendar-day.sat .day-num {
  color: #4a72b8;
}

.calendar-day.today .day-num {
  background: var(--ink);
  color: var(--paper);
}

.calendar-chip {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chip.kind-personal {
  background: #f4e2ea;
  color: #824461;
}

.calendar-more-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  padding-left: 4px;
}

.calendar-day-panel {
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
  padding: 12px;
}

.day-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

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

.day-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.day-panel-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 9px 11px;
  text-align: left;
}

.day-panel-item.kind-personal {
  border-color: #e5bfd0;
  background: #fdf4f8;
}

.day-panel-item-top {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.day-panel-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-panel-item-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-panel-add {
  width: 100%;
  margin-top: 4px;
}

.calendar-day-panel .empty-text {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.database-table-wrap {
  overflow: auto;
}

.database-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.database-table th,
.database-table td {
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.database-table th {
  color: var(--muted);
  font-size: 12px;
}

.sort-button {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  min-height: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 2px 4px;
  margin-left: -4px;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.sort-button:hover {
  background: var(--paper-muted);
  color: var(--ink);
}

.sort-arrow {
  opacity: 0.4;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.sort-active {
  color: var(--ink) !important;
}

.sort-active .sort-arrow {
  opacity: 1;
}

.meta-head .sortable {
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
}

.meta-head .sortable:hover {
  background: var(--paper-muted);
  color: var(--ink);
}

.meta-head .sortable .sort-arrow {
  margin-left: 2px;
}

.database-table tr {
  cursor: pointer;
}

.database-table tr:hover {
  background: var(--paper-muted);
}

.tag-cell {
  min-width: 132px;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.board-column {
  min-height: 420px;
  padding: 10px;
}

.board-column h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 15px;
}

.board-column small {
  margin-left: auto;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.board-card {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-muted);
  padding: 10px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.board-card:hover,
.board-card:focus-visible {
  background: var(--accent-soft);
}

.board-card strong,
.board-card p {
  margin: 0;
}

.board-card p {
  color: var(--muted);
  font-size: 13px;
}

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

.board-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.board-status-select {
  max-width: 100px;
}

.detail-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: none;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
}

.detail-drawer.open {
  display: block;
}

.detail-empty {
  padding: 12px;
}

.detail-header,
.dialog-header,
.section-title {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.detail-header h2,
.dialog-header h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.detail-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-title {
  align-items: center;
}

.section-title h3 {
  margin: 0;
  font-size: 15px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

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

.subtask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 76px;
  gap: 6px;
  align-items: end;
}

.subtask-form #subtaskTitle {
  grid-column: 1 / -1;
}

.subtask-date {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.subtask-date span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-meta .tag-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.subtask-list {
  display: grid;
  gap: 6px;
}

.subtask-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
}

.subtask-item input {
  width: auto;
  min-height: 0;
}

.subtask-item strong,
.subtask-item small {
  display: block;
}

.empty-text {
  margin: 0;
  font-size: 13px;
}

.task-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
}

.task-dialog::backdrop {
  background: rgba(47, 47, 43, 0.28);
}

.dialog-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
  }

  .side-nav {
    display: flex;
    margin-top: 14px;
    overflow-x: auto;
  }

  .side-link {
    white-space: nowrap;
  }

  .side-panel {
    display: none;
  }

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


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

  .schedule-shell {
    max-height: 68vh;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px 12px 24px;
  }

  h1 {
    font-size: 25px;
  }

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

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .subtask-form .secondary-button {
    grid-column: 1 / -1;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .filter-bar label {
    max-width: none;
  }

  .filter-bar .text-button {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }

  .overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2px 8px;
    padding: 8px 10px;
    box-shadow: none;
  }

  .overview-card span {
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
  }

  .overview-card strong {
    margin-top: 0;
    font-size: 22px;
    line-height: 1;
    text-align: right;
  }

  .overview-card p {
    display: none;
  }

  .toolbar {
    display: grid;
  }

  .calendar-bar,
  .calendar-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    margin-left: 0;
  }

  .calendar-mode {
    width: 100%;
  }

  .compact-field {
    width: 100%;
  }

  .schedule-board {
    --left-width: 198px;
    --day-width: 36px;
  }

  .meta-head,
  .task-meta {
    grid-template-columns: 74px 124px !important;
  }

  .meta-head span:nth-child(n + 3),
  .task-meta > :nth-child(n + 3) {
    display: none;
  }

  .task-meta > span,
  .task-meta > strong {
    padding: 0 8px;
    font-size: 12px;
  }

  .timeline-bar {
    height: 26px;
    padding: 0 6px;
    font-size: 11px;
  }

  .status-board {
    grid-template-columns: 1fr;
    gap: 8px;
    overflow-x: visible;
  }

  .board-column {
    min-height: 0;
    padding: 8px;
    box-shadow: none;
  }

  .board-column h2 {
    min-height: 34px;
    margin-bottom: 8px;
    padding: 0 2px;
    font-size: 14px;
  }

  .board-card {
    gap: 4px;
    margin-bottom: 6px;
    padding: 9px;
  }

  .board-card strong {
    font-size: 14px;
  }

  .board-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .board-card small {
    font-size: 11px;
  }

  .calendar-day {
    gap: 1px;
    min-height: 74px;
    padding: 4px 2px;
  }

  .calendar-day .day-num {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .calendar-chip {
    border-radius: 3px;
    padding: 1px 3px;
    font-size: 9px;
  }

  .calendar-day-panel {
    padding: 10px;
  }

  .day-panel-item strong {
    white-space: normal;
  }

  .day-panel-item-sub {
    white-space: normal;
  }

  /* 타임라인: 간트 대신 시간 묶음 카드 리스트 */
  .segmented-control,
  .property-toggles {
    display: none;
  }

  .schedule-shell.mobile-cards {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-cards .schedule-board {
    display: block;
    min-width: 0;
  }

  .tl-bucket-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 14px 2px 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }

  .tl-bucket-head:first-child {
    margin-top: 2px;
  }

  .tl-card {
    min-height: 60px;
  }

  .tl-card.selected {
    box-shadow: inset 0 0 0 2px var(--ink);
  }

  .tl-range {
    position: relative;
    display: block;
    height: 8px;
    margin-top: 7px;
    border-radius: 4px;
    background: #f0ece4;
  }

  .tl-range-fill {
    position: absolute;
    top: 0;
    min-width: 10px;
    height: 100%;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1.5px rgba(47, 47, 43, 0.28);
  }

  .tl-range-today {
    position: absolute;
    top: -3px;
    z-index: 1;
    width: 2px;
    height: 14px;
    border-radius: 1px;
    background: #b65d50;
  }

  /* 상태 보드: 상태 칩 탭바 + 선택 상태만 표시 */
  .status-board.mobile-chips {
    display: block;
  }

  .board-chipbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 2px 8px;
    background: var(--bg);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .board-chipbar::-webkit-scrollbar {
    display: none;
  }

  .board-chip {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }

  .board-chip b {
    color: var(--muted);
    font-size: 11px;
  }

  .board-chip.is-empty {
    opacity: 0.55;
  }

  .board-chip.active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }

  .board-chip.active b {
    color: inherit;
  }

  .status-board.mobile-chips .board-column h2 {
    display: none;
  }
}
