:root {
  --bg: #f2f5f9;
  --panel: #ffffff;
  --ink: #16202a;
  --muted: #5a6775;
  --border: #d7dee8;
  --accent: #1d6fa3;
  --status-bg: #f4f7fb;
  --error: #8d2b2b;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #f9fbfe 0%, #eef3f9 45%, #e6edf6 100%);
}

.layout {
  max-width: 100%;
  padding: var(--space-4);
}

.board-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-4);
  box-shadow: 0 10px 30px rgba(20, 58, 86, 0.08);
}

.board-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.board-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.board-intro {
  margin: var(--space-1) 0 var(--space-3);
  color: var(--muted);
}

.view-switch {
  display: inline-flex;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.view-switch:hover {
  text-decoration: underline;
}

#board-status {
  margin-left: var(--space-2);
  font-size: 0.92rem;
  color: var(--muted);
}

#board-status[data-tone="error"] {
  color: var(--error);
}

@media (max-width: 680px) {
  .board-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-switch {
    align-self: flex-end;
  }
}

.board-empty {
  margin: 0 0 var(--space-3);
  color: var(--muted);
}

.trello-board {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--space-2);
  align-items: stretch;
}

.trello-column,
.trello-developer-group {
  flex: 0 0 320px;
  width: 320px;
  background: #f7fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--space-2);
  height: min(68vh, 620px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trello-column.is-empty {
  flex-basis: 168px;
  width: 168px;
}

.trello-developer-group {
  flex-basis: 652px;
  width: 652px;
  height: auto;
  min-height: min(68vh, 620px);
}

.trello-column h2,
.trello-developer-group h2,
.trello-subcolumn h3 {
  margin: 0;
  color: #17486b;
}

.trello-column h2,
.trello-developer-group h2 {
  font-size: 1rem;
}

.trello-subcolumn h3 {
  font-size: 0.95rem;
}

.trello-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
}

.trello-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-2);
  min-height: 52px;
  display: flex;
  align-items: center;
}

.trello-card a {
  color: #163247;
  text-decoration: none;
  font-weight: 500;
}

.trello-card a:hover {
  text-decoration: underline;
}

.trello-developer-columns {
  display: flex;
  gap: var(--space-2);
  min-height: 0;
  flex: 1;
}

.trello-subcolumn {
  flex: 1 1 0;
  background: #eef4fa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
}

.trello-developer-group .trello-cards {
  overflow-y: visible;
}

@media (max-width: 900px) {
  .layout {
    padding: var(--space-3);
  }

  .board-shell {
    padding: var(--space-3);
  }

  .trello-column,
  .trello-developer-group {
    flex-basis: min(86vw, 320px);
    width: min(86vw, 320px);
    height: min(72vh, 580px);
  }

  .trello-column.is-empty {
    flex-basis: min(46vw, 168px);
    width: min(46vw, 168px);
  }

  .trello-developer-group {
    flex-basis: min(92vw, 652px);
    width: min(92vw, 652px);
    height: auto;
    min-height: min(72vh, 580px);
  }
}
