:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  background: #101213;
  color: #f0f3f2;
  --panel: #191c1d;
  --border: #2d3333;
  --muted: #a2adab;
  --accent: #a9f1cb;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: #141617;
  padding-top: env(safe-area-inset-top);
}

.brand {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: 19px;
}

.brand-icon, .project-icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: var(--accent);
  background: #22342d;
}

.brand-icon {
  width: 34px;
  height: 34px;
  font: 700 19px/1 ui-monospace, monospace;
}

main { padding-block: clamp(32px, 7vw, 86px) max(28px, env(safe-area-inset-bottom)); }
.intro { margin-bottom: clamp(24px, 4vw, 40px); }
h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.intro p { margin-top: 12px; color: var(--muted); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 26px);
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
h2 { font-size: 1.125rem; letter-spacing: -.02em; }
.count {
  border-radius: 999px;
  background: #22342d;
  color: var(--accent);
  padding: 2px 10px;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
.projects { list-style: none; padding: 0; margin: 0; }
.project {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  border-top: 1px solid var(--border);
}
.project:last-child { padding-bottom: 0; }
.project-icon { width: 42px; height: 42px; }
.project-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.project-info h3 { font-size: .975rem; }
.project-info p { color: var(--muted); font-size: .875rem; }
.project-info p:not([hidden]) { margin-top: 3px; }
.remove-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}
.remove-button:hover { color: #ffb6b2; background: #362525; }
.empty {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--muted);
}

form { display: grid; gap: 8px; margin-top: 16px; }
label { font-size: .875rem; font-weight: 600; }
label span { font-weight: 400; color: var(--muted); }
input, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: #111415;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
}
input { margin-bottom: 6px; }
textarea { resize: vertical; }
::placeholder { color: #87918f; }
.add-button {
  margin-top: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #13251d;
  font-weight: 700;
}
.add-button:hover { background: #c7f9de; }
.add-button span { margin-right: 4px; }
.feedback { color: var(--muted); font-size: .875rem; margin-top: 14px; }
.feedback:empty { margin-top: 0; }

@media (max-width: 680px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .shell {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}
