:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #162033;
  --muted: #657085;
  --line: #d9e0ea;
  --line-strong: #c4ccd8;
  --green: #12805c;
  --green-soft: #dff6eb;
  --blue: #225ad6;
  --blue-soft: #e5ecff;
  --amber: #a96a00;
  --amber-soft: #fff1d6;
  --red: #b42318;
  --red-soft: #fee4df;
  --shadow: 0 14px 40px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(34, 90, 214, 0.07), rgba(18, 128, 92, 0.03) 34%, transparent 54%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

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

a {
  color: inherit;
}

.app-shell {
  width: min(1820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.brand-mark-button:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctext y='24' font-size='24'%3E%F0%9F%90%AE%3C/text%3E%3C/svg%3E") 16 16, pointer;
}

.brand-mark-button:focus-visible {
  outline: 3px solid rgba(34, 90, 214, 0.22);
  outline-offset: 3px;
}

.brand-mark-button:hover .brand-mark {
  box-shadow: 0 10px 22px rgba(18, 128, 92, 0.2);
  transform: translateY(-1px) rotate(-2deg);
}

.brand-mark-button:active .brand-mark {
  transform: scale(0.96) rotate(2deg);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(18, 128, 92, 0.28);
  border-radius: 8px;
  background: #61d4f2;
  object-fit: cover;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  text-decoration: none;
}

.version-repo-link:hover {
  border-color: rgba(34, 90, 214, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
}

.version-repo-link:focus-visible {
  outline: 3px solid rgba(34, 90, 214, 0.18);
  outline-offset: 2px;
}

.version-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.brand-tagline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.1rem;
}

#boardMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-top: 7px;
}

#boardMeta > span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 3px 9px;
  font-size: 0.84rem;
  font-weight: 650;
}

#boardMeta strong {
  color: var(--ink);
  font-weight: 850;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill.is-loading {
  color: var(--blue);
  border-color: rgba(34, 90, 214, 0.28);
  background: var(--blue-soft);
}

.status-pill.is-error {
  color: var(--red);
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
}

.viewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px 3px 4px;
  text-decoration: none;
  white-space: nowrap;
}

.viewer-badge:hover {
  border-color: rgba(34, 90, 214, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
}

.viewer-badge img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.viewer-badge[hidden] {
  display: none;
}

.button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
}

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

.button:focus-visible,
.search-select-button:focus-visible,
.clear-filters-button:focus-visible,
input:focus,
textarea:focus,
select:focus,
.pr-card:focus-visible {
  outline: 3px solid rgba(34, 90, 214, 0.18);
  outline-offset: 2px;
}

.button-primary {
  border-color: #174ab9;
  background: var(--blue);
  color: #fff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.clear-filters-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid rgba(34, 90, 214, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
  padding: 0 9px;
}

.clear-filters-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.clear-filters-button:hover {
  border-color: rgba(34, 90, 214, 0.42);
  background: var(--blue-soft);
}

.clear-filters-button[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.settings-menu {
  position: relative;
  flex: 0 0 auto;
}

.settings-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.settings-menu summary::-webkit-details-marker {
  display: none;
}

.settings-menu summary:hover {
  border-color: var(--blue);
}

.settings-menu summary:focus-visible {
  outline: 3px solid rgba(34, 90, 214, 0.18);
  outline-offset: 2px;
}

.settings-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.settings-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.settings-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.settings-popover-header strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.icon-button:hover {
  border-color: var(--red);
  color: var(--red);
}

.settings-help {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.settings-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.checkbox-row input {
  margin: 0;
}

.settings-help:hover {
  text-decoration: underline;
}

.token-safety-note {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(169, 106, 0, 0.32);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff8e8, #fffdf7);
  color: #6f4b00;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 10px 10px 10px 12px;
}

.token-safety-note strong {
  color: var(--amber);
  font-size: 0.8rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.settings-popover .checkbox-row input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
}

.token-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-input-row input {
  min-width: 0;
}

.token-button,
.settings-save-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.token-button:hover,
.settings-save-button:not(:disabled):hover {
  border-color: var(--blue);
}

.settings-save-button {
  border-color: #174ab9;
  background: var(--blue);
  color: #fff;
}

.settings-save-button:disabled {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.settings-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

textarea {
  resize: vertical;
  min-height: 40px;
}

.repo-picker {
  align-self: center;
}

.header-repo-picker {
  display: flex;
  align-items: center;
  width: min(620px, 48vw);
  min-width: 420px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.repo-select {
  min-width: 120px;
  color: var(--ink);
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.header-repo-picker .label-row {
  flex: 0 0 auto;
  gap: 8px;
}

.header-repo-picker .breadcrumb-select {
  flex: 1 1 auto;
  min-width: 220px;
}

.search-select {
  position: relative;
  width: 100%;
}

.search-select-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 9px 34px 9px 10px;
  text-align: left;
}

.search-select-button::after {
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.search-select-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.header-repo-picker .search-select-button {
  min-height: 44px;
}

.search-select.is-open .search-select-button {
  border-color: var(--blue);
}

.search-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.filter-control .search-select-menu {
  right: 0;
  left: auto;
  width: min(420px, calc(100vw - 32px));
}

.search-select-menu[hidden] {
  display: none;
}

.search-select-search {
  min-height: 38px;
  margin-bottom: 8px;
}

.search-select-options {
  display: grid;
  gap: 2px;
  max-height: 310px;
  overflow: auto;
}

.search-select-option {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
}

.search-select-option:hover,
.search-select-option.is-selected {
  background: var(--blue-soft);
  color: var(--blue);
}

.search-select-group {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.search-select-empty {
  padding: 12px 10px;
  color: var(--muted);
  font-weight: 700;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 14px;
  border: 1px solid rgba(34, 90, 214, 0.22);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--ink);
  padding: 12px 14px;
}

.notice[hidden] {
  display: none;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.notice span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.notice-button {
  border: 1px solid rgba(34, 90, 214, 0.32);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.notice-button:hover {
  border-color: var(--blue);
}

.message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  padding: 12px 14px;
}

.message[hidden] {
  display: none;
}

.message-action {
  flex: 0 0 auto;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  cursor: pointer;
  font-weight: 800;
  padding: 6px 10px;
}

.message-action:hover {
  border-color: var(--red);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric-clickable {
  cursor: pointer;
}

.metric-clickable:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(22, 32, 51, 0.06);
  transform: translateY(-1px);
}

.metric-clickable:focus-visible {
  outline: 3px solid rgba(34, 90, 214, 0.18);
  outline-offset: 2px;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-badge {
  display: none;
  flex: 0 0 auto;
  border: 1px solid rgba(169, 106, 0, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.metric-alert strong {
  color: var(--amber);
}

.metric-aging .metric-badge {
  display: inline-flex;
  border-color: rgba(18, 128, 92, 0.26);
  background: var(--green-soft);
  color: var(--green);
}

.metric-aging.is-attention strong {
  color: var(--red);
}

.metric-aging.is-attention {
  border-color: rgba(180, 35, 24, 0.34);
  border-left: 5px solid var(--red);
  background: linear-gradient(180deg, #fff5f3, #fff);
  box-shadow: 0 6px 18px rgba(180, 35, 24, 0.06);
}

.metric-aging.is-attention .metric-badge {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.metric-aging.metric-clickable:hover {
  border-color: rgba(180, 35, 24, 0.58);
  box-shadow: 0 10px 24px rgba(180, 35, 24, 0.1);
}

.metric-alert.is-attention {
  border-color: rgba(169, 106, 0, 0.42);
  border-left: 5px solid var(--amber);
  background: linear-gradient(180deg, #fff9ed, #fff);
  box-shadow: 0 6px 18px rgba(169, 106, 0, 0.07);
}

.metric-alert.metric-clickable:hover {
  border-color: rgba(169, 106, 0, 0.62);
  box-shadow: 0 10px 24px rgba(169, 106, 0, 0.11);
}

.metric-alert.is-attention .metric-badge {
  display: inline-flex;
}

.board-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0 12px;
}

.board-heading {
  min-width: 0;
}

.board-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.board-controls {
  display: grid;
  align-items: end;
  flex: 1 1 100%;
  width: 100%;
  grid-template-columns: auto minmax(220px, 1.25fr) minmax(150px, 0.9fr) minmax(190px, 1fr) minmax(140px, 0.8fr) minmax(190px, 1fr);
  gap: 16px;
}

.filter-control {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-icon {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 17px;
  height: 17px;
  color: var(--muted);
  cursor: help;
  outline: none;
}

.help-icon:hover,
.help-icon:focus-visible {
  color: var(--blue);
}

.help-icon-svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.tooltip-content {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 60;
  display: grid;
  gap: 7px;
  width: min(292px, calc(100vw - 40px));
  border: 1px solid rgba(196, 204, 216, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.16);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 560;
  line-height: 1.3;
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -2px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
  white-space: normal;
}

.tooltip-wide {
  width: min(340px, calc(100vw - 40px));
}

.tooltip-title {
  display: block;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
}

.tooltip-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.38fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tooltip-row strong {
  color: var(--blue);
  font-weight: 820;
}

.tooltip-row span {
  color: var(--muted);
  font-weight: 560;
}

.tooltip-content::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(196, 204, 216, 0.92);
  border-left: 1px solid rgba(196, 204, 216, 0.92);
  background: rgba(255, 255, 255, 0.98);
  transform: translateX(-50%) rotate(45deg);
}

.help-icon:hover .tooltip-content,
.help-icon:focus-visible .tooltip-content {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.filter-control-age .tooltip-content {
  left: 0;
  transform: translate(0, -2px);
}

.filter-control-age .tooltip-content::before {
  left: 10px;
  transform: rotate(45deg);
}

.filter-control-age .help-icon:hover .tooltip-content,
.filter-control-age .help-icon:focus-visible .tooltip-content {
  transform: translate(0, 0);
}

.filter-control-search .tooltip-content {
  right: 0;
  left: auto;
  transform: translate(0, -2px);
}

.filter-control-search .tooltip-content::before {
  right: 10px;
  left: auto;
  transform: rotate(45deg);
}

.filter-control-search .help-icon:hover .tooltip-content,
.filter-control-search .help-icon:focus-visible .tooltip-content {
  transform: translate(0, 0);
}

.filter-control-small {
  min-width: 150px;
}

.filter-control-search {
  min-width: 190px;
}

.filter-control-age {
  justify-content: end;
  min-width: 0;
}

.filter-control select,
.filter-control .search-select-button {
  font-size: inherit;
  font-weight: 800;
}

.age-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.board-scrollbar-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  margin-bottom: 10px;
  scrollbar-color: var(--line-strong) rgba(255, 255, 255, 0.72);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.board-scrollbar-top[hidden] {
  display: none;
}

.board-scrollbar-top-inner {
  height: 1px;
}

.board-scrollbar-top::-webkit-scrollbar {
  height: 12px;
}

.board-scrollbar-top::-webkit-scrollbar-track {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.board-scrollbar-top::-webkit-scrollbar-thumb {
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: var(--line-strong);
}

.board-scrollbar-top::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 1fr);
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

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

.lane {
  min-height: 280px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  scroll-snap-align: start;
}

.lane.is-unassigned {
  background: rgba(255, 241, 214, 0.32);
}

.lane.has-aging {
  background: rgba(255, 255, 255, 0.76);
}

.lane.is-unassigned.has-aging {
  background: rgba(255, 241, 214, 0.32);
}

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

.lane-person {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.lane-person > div {
  min-width: 0;
}

.lane-person[href]:hover .lane-title,
.lane-person[href]:focus-visible .lane-title {
  color: var(--blue);
}

.lane-person[href]:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(34, 90, 214, 0.18);
  outline-offset: 3px;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 800;
}

.lane-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-subtitle {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-age-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.lane-age-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  padding: 2px 6px;
  white-space: nowrap;
}

.lane-age-red {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.lane-age-yellow {
  border-color: rgba(169, 106, 0, 0.26);
  background: var(--amber-soft);
  color: var(--amber);
}

.lane-age-green {
  border-color: rgba(18, 128, 92, 0.26);
  background: var(--green-soft);
  color: var(--green);
}

.lane-age-draft {
  border-color: var(--line-strong);
  color: var(--muted);
}

.lane-stats {
  display: grid;
  justify-items: end;
  gap: 5px;
  flex: 0 0 auto;
}

.lane-oldest {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.lane.has-aging .lane-oldest {
  color: var(--red);
}

.lane-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 850;
}

.lane-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.empty-state {
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.board-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(22, 32, 51, 0.06);
  color: var(--muted);
  padding: 22px;
  grid-column: 1 / -1;
  text-align: left;
}

.board-loader strong,
.board-loader span {
  display: block;
}

.board-loader strong {
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 3px;
}

.board-loader .board-loader-viewer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.board-loader .board-loader-viewer img {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.board-loader-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pr-card {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-decoration: none;
}

.pr-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.09);
  z-index: 10;
}

.pr-card.pr-age-green {
  background:
    linear-gradient(135deg, rgba(18, 128, 92, 0.07), rgba(18, 128, 92, 0.025) 42%, rgba(255, 255, 255, 0) 76%),
    #fff;
}

.pr-card.pr-age-yellow {
  background:
    linear-gradient(135deg, rgba(169, 106, 0, 0.08), rgba(169, 106, 0, 0.028) 42%, rgba(255, 255, 255, 0) 76%),
    #fff;
}

.pr-card.pr-age-red {
  background:
    linear-gradient(135deg, rgba(180, 35, 24, 0.09), rgba(180, 35, 24, 0.032) 42%, rgba(255, 255, 255, 0) 76%),
    #fff;
}

.card-gradients-off .pr-card.pr-age-green,
.card-gradients-off .pr-card.pr-age-yellow,
.card-gradients-off .pr-card.pr-age-red {
  background: #fff;
}

.pr-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.pr-meta-lead,
.pr-meta-aside {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pr-meta-dot {
  color: rgba(117, 128, 147, 0.8);
}

.pr-card-tooltip {
  top: calc(100% + 10px);
  left: 12px;
  width: min(360px, calc(100vw - 40px));
  transform: translate(0, -2px);
}

.pr-card-tooltip::before {
  left: 18px;
  transform: rotate(45deg);
}

.pr-card:hover .pr-card-tooltip,
.pr-card:focus-visible .pr-card-tooltip {
  opacity: 1;
  transform: translate(0, 0);
  visibility: visible;
}

.pr-title {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.26;
  overflow-wrap: anywhere;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pr-footer {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.pr-footer-main,
.pr-footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pr-footer-main {
  justify-content: space-between;
}

.pr-footer-tags {
  justify-content: flex-start;
}

.pr-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.pr-comments svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.pr-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.pr-author-avatar {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid rgba(117, 128, 147, 0.24);
  border-radius: 999px;
  background: var(--panel-soft);
  object-fit: cover;
}

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

.age-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--panel-soft);
  font-weight: 800;
  white-space: nowrap;
}

.age-filter {
  appearance: none;
  min-height: 32px;
  cursor: pointer;
  font: inherit;
}

.age-filter:hover {
  border-color: currentColor;
}

.age-filter.is-active {
  box-shadow: 0 0 0 3px rgba(34, 90, 214, 0.16);
}

.age-filter.is-active::after {
  content: "x";
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(22, 32, 51, 0.12);
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.age-green {
  border-color: rgba(18, 128, 92, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.age-yellow {
  border-color: rgba(169, 106, 0, 0.28);
  background: var(--amber-soft);
  color: var(--amber);
}

.age-red {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.age-neutral {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
}

.tag {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-draft {
  border-color: rgba(34, 90, 214, 0.24);
  background: var(--blue-soft);
  color: var(--blue);
}

.tag-stale {
  border-color: rgba(169, 106, 0, 0.26);
  background: var(--amber-soft);
  color: var(--amber);
}

.tag-team {
  border-color: rgba(18, 128, 92, 0.26);
  background: var(--green-soft);
  color: var(--green);
}

.tag-approval {
  border-color: rgba(18, 128, 92, 0.26);
  background: var(--green-soft);
  color: var(--green);
}

.tag-review {
  border-color: rgba(34, 90, 214, 0.22);
  background: var(--blue-soft);
  color: var(--blue);
}

.tag-changes {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.tag-author-association {
  border-color: rgba(117, 128, 147, 0.24);
  background: rgba(233, 237, 244, 0.78);
  color: #546276;
}

.cow-particle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  font-size: var(--size, 28px);
  line-height: 1;
  filter: drop-shadow(0 8px 12px rgba(22, 32, 51, 0.18));
  transform: translate(-50%, -50%) scale(0.35);
  animation: cow-burst var(--duration, 1200ms) cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

@keyframes cow-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(var(--scale, 1)) rotate(var(--rot));
  }
}

@media (max-width: 1040px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1820px);
    padding-top: 14px;
  }

  .topbar,
  .board-header {
    align-items: stretch;
    flex-direction: column;
  }

  .board-controls {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .notice {
    align-items: stretch;
    flex-direction: column;
  }

  .notice-actions {
    justify-content: flex-start;
  }

  .filter-control {
    min-width: 0;
  }

  .top-actions {
    justify-content: flex-start;
  }

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

  .header-repo-picker {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .header-repo-picker .breadcrumb-select {
    flex-basis: 100%;
  }

  .board {
    grid-auto-columns: minmax(270px, 88vw);
  }
}
