:root {
  color-scheme: light;
  --canvas: oklch(96.5% 0.004 260);
  --surface: oklch(99% 0.002 260);
  --surface-raised: oklch(100% 0 0);
  --surface-soft: oklch(93.5% 0.006 260);
  --ink: oklch(20% 0.01 260);
  --ink-muted: oklch(45% 0.014 260);
  --line: oklch(88% 0.007 260);
  --line-strong: oklch(70% 0.016 260);
  --brand: oklch(49% 0.14 255);
  --brand-strong: oklch(41% 0.12 255);
  --brand-soft: oklch(94.5% 0.025 255);
  --brand-ink: oklch(98.5% 0.004 255);
  --brand-deep: oklch(31% 0.09 255);
  --on-brand-surface: oklch(98.5% 0.004 255);
  --green: oklch(48% 0.12 155);
  --green-soft: oklch(92% 0.035 155);
  --coral: oklch(50% 0.16 20);
  --coral-soft: oklch(92% 0.035 20);
  --yellow: oklch(51% 0.11 75);
  --yellow-soft: oklch(92% 0.04 75);
  --sidebar: oklch(98% 0.004 260);
  --sidebar-raised: oklch(93.5% 0.006 260);
  --sidebar-ink: oklch(24% 0.012 260);
  --sidebar-muted: oklch(45% 0.014 260);
  --sidebar-line: oklch(86% 0.009 260);
  --scrim: oklch(10% 0.008 260 / 48%);
  --shadow: 0 10px 28px color-mix(in srgb, var(--ink) 12%, transparent);
  --header-height: 76px;
  --sidebar-width: 244px;
  --z-header: 30;
  --z-backdrop: 60;
  --z-panel: 70;
  --z-toast: 100;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: oklch(17% 0.008 260);
  --surface: oklch(20.5% 0.01 260);
  --surface-raised: oklch(24% 0.012 260);
  --surface-soft: oklch(27% 0.014 260);
  --ink: oklch(92.5% 0.006 260);
  --ink-muted: oklch(68% 0.012 260);
  --line: oklch(29% 0.012 260);
  --line-strong: oklch(38% 0.016 260);
  --brand: oklch(72% 0.13 265);
  --brand-strong: oklch(78% 0.11 265);
  --brand-soft: oklch(30% 0.055 265);
  --brand-ink: oklch(18% 0.035 265);
  --brand-deep: oklch(18% 0.035 265);
  --on-brand-surface: oklch(95% 0.008 265);
  --green: oklch(72% 0.11 155);
  --green-soft: oklch(28% 0.05 155);
  --coral: oklch(72% 0.12 20);
  --coral-soft: oklch(29% 0.055 20);
  --yellow: oklch(78% 0.11 75);
  --yellow-soft: oklch(30% 0.05 75);
  --sidebar: oklch(18% 0.009 260);
  --sidebar-raised: oklch(23% 0.012 260);
  --sidebar-ink: oklch(92% 0.006 260);
  --sidebar-muted: oklch(66% 0.012 260);
  --sidebar-line: oklch(28% 0.012 260);
  --scrim: oklch(8% 0.006 260 / 64%);
  --shadow: 0 12px 30px color-mix(in srgb, black 24%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

::selection {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  color: var(--ink);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: var(--z-toast);
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 750;
  transform: translateY(-150%);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  z-index: var(--z-header);
  top: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(260px, 680px) 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 0;
  border-radius: 8px;
  background: black;
  object-fit: cover;
  transition: transform 180ms var(--ease-out);
}

.brand:hover .brand-mark {
  transform: translateY(-1px) rotate(-3deg);
}

.brand-copy strong {
  transition: color 160ms ease;
}

.brand:hover .brand-copy strong {
  color: var(--brand-strong);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: 22px 1fr 34px;
  align-items: center;
  min-height: 48px;
  padding: 0 7px 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-box:focus-within {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

.search-box > svg {
  color: var(--ink-muted);
  transition: color 160ms ease, transform 160ms var(--ease-out);
}

.search-box:focus-within > svg {
  color: var(--brand);
  transform: scale(1.08);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box input::placeholder {
  color: var(--ink-muted);
}

.search-clear {
  visibility: hidden;
  opacity: 0;
}

.search-box.has-value .search-clear {
  visibility: visible;
  opacity: 1;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.action-button,
.load-more,
.view-switch button,
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
}

.action-button {
  min-height: 44px;
  gap: 8px;
  padding: 0 15px;
  font-weight: 700;
}

#random-button {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

#random-button:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: var(--brand-ink);
}

.icon-button:hover,
.action-button:hover,
.load-more:hover,
.view-switch button:hover,
.card-action:hover {
  border-color: var(--ink-muted);
  background: var(--surface-soft);
}

.icon-button:active,
.action-button:active,
.load-more:active,
.view-switch button:active,
.card-action:active {
  transform: translateY(1px);
}

.icon-button:focus-visible,
.action-button:focus-visible,
.load-more:focus-visible,
.card-action:focus-visible,
.filter-option:focus-visible,
.filter-chip:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  max-width: 1600px;
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 0;
}

.filter-panel {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  min-height: calc(100vh - var(--header-height));
  padding: 32px 18px 30px 28px;
  border-right: 1px solid var(--sidebar-line);
  background: var(--sidebar);
  color: var(--sidebar-ink);
}

.mobile-panel-head {
  display: none;
}

.filter-section + .filter-section {
  margin-top: 30px;
}

.filter-section h2,
.filter-section > label {
  display: block;
  margin: 0 0 10px;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 800;
}

.status-filters {
  display: grid;
  gap: 4px;
}

.filter-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--sidebar-muted);
  text-align: left;
  transition: transform 150ms var(--ease-out), background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.filter-option span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.filter-option svg {
  width: 17px;
}

.filter-option b {
  min-width: 28px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--sidebar-raised);
  color: var(--sidebar-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  text-align: center;
  transition: background 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.filter-option:hover {
  background: var(--sidebar-raised);
  color: var(--sidebar-ink);
  transform: translateX(2px);
}

.filter-option:hover b {
  background: color-mix(in srgb, var(--brand) 16%, var(--sidebar-raised));
  color: var(--sidebar-ink);
  transform: translateX(-1px);
}

.filter-option.active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 750;
}

.filter-option.active b {
  background: color-mix(in srgb, var(--brand-ink) 14%, transparent);
  color: var(--brand-ink);
}

.filter-option.active span svg {
  color: var(--brand-ink);
}

.select-wrap {
  display: grid;
  grid-template-columns: 20px 1fr 16px;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  background: var(--sidebar-raised);
  color: var(--sidebar-muted);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.select-wrap:focus-within {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--sidebar-raised) 82%, var(--brand-soft));
  color: var(--sidebar-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.select-wrap select,
.sort-control select {
  width: 100%;
  border: 0;
  outline: 0;
  appearance: none;
  background-color: transparent;
  color: var(--ink);
}

.filter-panel .select-wrap select {
  color: var(--sidebar-ink);
}

.select-wrap svg:last-child {
  width: 15px;
  pointer-events: none;
}

.source-block {
  padding: 14px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  background: var(--sidebar-raised);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.source-block:hover {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--sidebar-line));
  background: color-mix(in srgb, var(--sidebar-raised) 88%, var(--brand-soft));
  transform: translateY(-2px);
}

.source-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
}

.source-head div {
  display: flex;
  flex-direction: column;
}

.source-head span:not(.source-icon) {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.source-links {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.source-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--sidebar-line);
  color: var(--sidebar-ink);
  font-size: 12px;
  font-weight: 700;
}

.source-links a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-links a b {
  color: var(--sidebar-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
}

.source-links a svg {
  width: 14px;
  color: var(--brand);
  transition: transform 150ms var(--ease-out);
}

.source-links a:hover {
  color: var(--brand-strong);
}

.source-links a:hover svg {
  transform: translate(1px, -1px);
}

.content-area {
  min-width: 0;
  padding: 34px 28px 72px 36px;
}

.overview-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto minmax(220px, 0.8fr);
  min-height: 112px;
  align-items: end;
  border-bottom: 1px solid var(--line-strong);
}

.overview-primary,
.overview-stat,
.overview-note {
  min-height: 0;
  padding: 0 24px 22px;
}

.overview-primary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-left: 0;
}

.overview-primary span {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
}

.overview-primary strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 46px;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.overview-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.stat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.stat-dot.city {
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

.overview-note {
  display: flex;
  justify-content: flex-end;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: right;
}

.result-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 0 22px;
}

.result-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  text-wrap: balance;
}

.result-heading p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.mobile-filter-button {
  display: none;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.sort-control:focus-within {
  border-color: var(--brand);
  background: var(--surface-raised);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.sort-control select {
  min-width: 82px;
  cursor: pointer;
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  min-height: 44px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.view-switch button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
}

.view-switch button.active {
  background: var(--brand);
  color: var(--brand-ink);
}

.view-switch button:not(.active):hover {
  color: var(--brand-strong);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-bottom: 14px;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 13px;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.filter-chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  transform: translateY(-1px);
}

.filter-chip svg {
  width: 13px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  contain: layout style;
}

.skeleton-card {
  position: relative;
  overflow: hidden;
  display: grid;
  height: 314px;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  animation: skeleton-pulse 900ms ease-in-out infinite alternate;
}

.skeleton-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 28%, color-mix(in srgb, var(--surface-raised) 70%, transparent) 48%, transparent 68%);
  content: "";
  pointer-events: none;
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.skeleton-line {
  width: 100%;
  height: 12px;
  border-radius: 4px;
  background: var(--surface-soft);
}

.skeleton-line.title {
  width: 58%;
  height: 20px;
  margin-top: 8px;
}

.skeleton-line.meta {
  width: 36%;
}

.skeleton-line.short {
  width: 72%;
}

.project-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 314px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  contain: layout paint style;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 17px;
  font-weight: 800;
  object-fit: cover;
}

.favorite-button.active {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.favorite-button.active svg {
  fill: currentColor;
}

.favorite-button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 17px;
}

.title-stack {
  flex: 1;
  min-width: 0;
}

.card-title-row h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill.developing {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-pill.closed {
  background: var(--coral-soft);
  color: var(--coral);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.card-author svg {
  width: 13px;
}

.card-description {
  display: -webkit-box;
  margin: 15px 0 18px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.card-domain {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.card-action {
  width: 38px;
  height: 38px;
  padding: 0;
}

.card-action.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

.project-grid.list-view {
  grid-template-columns: 1fr;
}

.project-grid.list-view .project-card {
  display: grid;
  grid-template-columns: 50px minmax(190px, 0.8fr) minmax(280px, 1.6fr) 170px;
  height: auto;
  min-height: 104px;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.project-grid.list-view .card-head {
  display: block;
}

.project-grid.list-view .favorite-button {
  display: none;
}

.project-grid.list-view .card-title-row {
  margin: 0;
}

.project-grid.list-view .card-description {
  margin: 0;
  -webkit-line-clamp: 2;
}

.project-grid.list-view .card-footer {
  margin: 0;
  padding: 0;
  border: 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 28px;
}

.load-more {
  min-height: 44px;
  gap: 8px;
  padding: 0 18px;
  font-weight: 700;
}

.empty-state {
  padding: 72px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease;
}

.empty-state:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--surface) 92%, var(--brand-soft));
}

.empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-muted);
}

.empty-state h2 {
  margin: 16px 0 6px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 13px;
}

.drawer-backdrop,
.filter-backdrop {
  position: fixed;
  z-index: var(--z-backdrop);
  inset: 0;
  visibility: hidden;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.drawer-backdrop.open,
.filter-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.detail-drawer {
  position: fixed;
  z-index: var(--z-panel);
  top: 0;
  right: 0;
  width: min(460px, 92vw);
  height: 100vh;
  padding: 28px;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  z-index: 1;
  top: 20px;
  right: 20px;
}

.drawer-project-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 52px 0 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-project-head::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brand);
  content: "";
}

.drawer-project-head .project-avatar {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.drawer-project-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.drawer-description {
  margin: 24px 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.8;
}

.drawer-meta {
  display: grid;
  border-top: 1px solid var(--line);
}

.drawer-meta-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-meta-row span {
  color: var(--ink-muted);
  font-size: 12px;
}

.drawer-meta-row b,
.drawer-meta-row a {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.drawer-meta-row a {
  color: var(--brand-strong);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  margin-top: 24px;
}

.drawer-actions .action-button:first-child {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

.toast {
  position: fixed;
  z-index: var(--z-toast);
  bottom: 24px;
  left: 50%;
  min-width: 180px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes skeleton-pulse {
  from {
    opacity: 0.58;
  }

  to {
    opacity: 1;
  }
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1180px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-note {
    display: none;
  }

  .overview-stat:last-of-type {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 126px;
  }

  .app-header {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 18px;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .action-button span {
    display: none;
  }

  .header-actions .action-button {
    width: 40px;
    padding: 0;
  }

  .app-shell {
    display: block;
    padding: 0 18px;
  }

  .filter-panel {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    width: min(330px, 88vw);
    height: 100vh;
    min-height: 0;
    padding: 20px;
    border-right: 1px solid var(--sidebar-line);
    overflow-y: auto;
    background: var(--sidebar);
    box-shadow: var(--shadow);
    transform: translateX(-102%);
    transition: transform 240ms ease;
  }

  .filter-panel.open {
    transform: translateX(0);
  }

  .mobile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
  }

  .mobile-filter-button {
    display: inline-flex;
  }

  .content-area {
    padding: 24px 18px 56px;
  }

  .overview-strip {
    grid-template-columns: minmax(220px, 1fr) auto auto;
  }

  .overview-note {
    display: none;
  }
}

@media (max-width: 680px) {
  .brand-copy small {
    display: none;
  }

  .overview-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 122px;
  }

  .overview-primary {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .overview-primary,
  .overview-stat {
    min-height: 58px;
    padding: 0 15px;
  }

  .overview-primary {
    align-items: baseline;
    padding: 0 15px 16px;
  }

  .overview-primary strong {
    font-size: 38px;
  }

  .overview-stat:nth-child(3) {
    border-right: 0;
  }

  .result-toolbar {
    align-items: center;
  }

  .result-heading h1 {
    font-size: 20px;
  }

  .sort-control span,
  .view-switch {
    display: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .card-description {
    font-size: 14px;
  }

  .card-action,
  .project-card .favorite-button {
    width: 44px;
    height: 44px;
  }

  .project-grid.list-view .project-card {
    display: flex;
    min-height: 228px;
  }

  .project-grid.list-view .card-head {
    display: flex;
  }

  .project-grid.list-view .favorite-button {
    display: inline-flex;
  }

  .project-grid.list-view .card-title-row {
    margin-top: 17px;
  }

  .project-grid.list-view .card-description {
    margin: 15px 0 18px;
  }

  .project-grid.list-view .card-footer {
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--line);
  }

  .detail-drawer {
    padding: 20px;
  }

  .drawer-project-head h2 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
