:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6f6f6f;
  --line: #e6e6e6;
  --line-strong: #d7d7d7;
  --yellow: #ffe566;
  --yellow-soft: #fff4b8;
  --green: #bfe8c9;
  --orange: #ef7a38;
  --orange-ink: #b34712;
  --orange-bg: #fff1e8;
  --star: #c9a227;
  --waiting: #3d6d8c;
  --waiting-bg: #eef5f8;
  --today: #2f6f4e;
  --today-bg: #e7f4ec;
  --done: #6b6b6b;
  font-family: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 13px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.banner {
  margin: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.banner.error {
  color: #9c1c1c;
  background: #fff2f2;
}

.hidden {
  display: none;
}

.agenda {
  border-bottom: 1px solid var(--line);
}

.agenda-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 110px 110px 28px;
  gap: 8px;
  align-items: center;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 34px;
}

.agenda-row:last-child {
  border-bottom: 0;
}

.agenda-num,
.agenda-clock {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

.agenda-row select,
.row-detail select,
.row-detail input[type="date"],
.row-detail input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 3px 6px;
  font: inherit;
}

.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: calc(100vh - 220px);
}

.board {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 18px 16px 12px;
}

h1,
h2 {
  margin: 0;
  font-weight: 650;
}

h1 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search input {
  width: min(360px, 46vw);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 14px 7px 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236f6f6f' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 10px 50% no-repeat;
  font: inherit;
}

.table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 110px 28px;
  gap: 8px;
  padding: 7px 16px;
  background: var(--yellow);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 110px 28px;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  min-height: 40px;
}

.row.done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.row.pending {
  opacity: 0.65;
}

.row.open {
  background: #fff;
}

.task {
  display: grid;
  grid-template-columns: 18px 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

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

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #222;
  cursor: pointer;
}

.star {
  border: 0;
  background: transparent;
  color: #c5c5c5;
  padding: 0;
  width: 22px;
  height: 22px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.star[aria-pressed="true"] {
  color: var(--star);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
}

.pill.overdue {
  color: var(--orange-ink);
  background: var(--orange-bg);
  border-color: #f3c4a6;
}

.pill.waiting {
  color: var(--waiting);
  background: var(--waiting-bg);
  border-color: #c9dbe4;
}

.pill.today,
.pill.doing {
  color: var(--today);
  background: var(--today-bg);
  border-color: #b9dcc8;
}

.pill.open {
  color: #555;
  background: #f4f4f4;
  border-color: #ddd;
}

.pill.done,
.pill.cancelled {
  color: var(--done);
  background: #f3f3f3;
}

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

.expand {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.row-detail {
  grid-column: 1 / -1;
  display: none;
  gap: 10px;
  padding: 0 0 12px 44px;
  color: var(--muted);
}

.row.expanded .row-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.row-detail label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.more {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font: inherit;
  cursor: pointer;
}

.more[hidden] {
  display: none;
}

.side {
  display: flex;
  flex-direction: column;
  min-width: 280px;
}

.panel {
  border-bottom: 1px solid var(--line);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 8px;
}

.badge {
  min-width: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.waiting,
.rules {
  margin: 0;
  padding: 0 16px 16px;
}

.wait-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.wait-card strong,
.wait-card p,
.wait-card span {
  display: block;
}

.wait-card p {
  margin: 4px 0;
  color: var(--muted);
}

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

.rules {
  list-style: none;
  counter-reset: rule;
}

.rules li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 12px;
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule);
  color: var(--muted);
}

.rule-copy {
  min-width: 0;
}

.rules strong {
  display: block;
  margin-bottom: 2px;
}

.rules p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.advice-band {
  border-top: 1px solid var(--line);
}

.advice-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--green);
}

.advice-head p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

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

.advice article {
  padding: 14px 16px 18px;
  border-right: 1px solid var(--line);
}

.advice article:last-child {
  border-right: 0;
}

.advice .kind {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.advice h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
}

.advice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.empty {
  padding: 18px 16px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .desk,
  .advice,
  .row.expanded .row-detail,
  .agenda-row {
    display: block;
  }

  .board {
    border-right: 0;
  }

  .search input {
    width: 100%;
  }

  .row,
  .table-head {
    grid-template-columns: minmax(0, 1fr) 80px 88px 24px;
  }
}
