:root {
  --bg: #050505;
  --surface: #111113;
  --surface-2: #18181b;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4f5;
  --muted: #71717a;
  --positive: #53c353;
  --negative: #c15252;
  --warn: #fbbf24;
  --radius: 12px;
  --gap: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

.shell {
  max-width: 920px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 48px;
}

.top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand:hover {
  color: var(--positive);
}

.brand-sep,
.brand-page {
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.form-panel + .results-panel {
  margin-top: 20px;
}

.row-budget {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .row-budget {
    grid-template-columns: 1fr 160px 100px;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

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

input[type="search"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

input:focus,
select:focus {
  outline: 2px solid rgba(83, 195, 83, 0.45);
  outline-offset: 0;
}

#container-search {
  margin-bottom: 6px;
}

select#container {
  max-height: 140px;
}

.props-block {
  margin-top: 24px;
}

.props-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.text-btn {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
}

.text-btn:hover {
  color: var(--text);
}

.picked {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.picked:empty {
  display: none;
}

.picked li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}

.picked .num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(83, 195, 83, 0.15);
  color: var(--positive);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.picked button {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.picked button:hover {
  color: var(--negative);
}

.prop-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s, background 0.15s;
}

.chip:hover:not(:disabled) {
  border-color: rgba(83, 195, 83, 0.35);
}

.chip:disabled {
  opacity: 0.35;
  cursor: default;
}

.chip[aria-pressed="true"] {
  border-color: var(--positive);
  background: rgba(83, 195, 83, 0.08);
}

.actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.primary {
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 600;
  cursor: pointer;
  background: var(--positive);
  color: #041104;
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 120px;
}

.status.error {
  color: var(--negative);
}

.status.busy {
  color: var(--warn);
}

.build {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.build:first-child {
  border-top: none;
  padding-top: 0;
}

.build-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.build-title {
  font-weight: 600;
  font-size: 16px;
}

.build-meta {
  font-size: 14px;
  color: var(--muted);
}

.build-meta strong {
  color: var(--text);
  font-weight: 600;
}

.build-goals {
  margin: -6px 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.art-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.art-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.art-row img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #000;
}

.art-name {
  font-weight: 500;
  font-size: 14px;
}

.art-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.art-price {
  font-size: 13px;
  font-weight: 500;
  text-align: end;
  white-space: nowrap;
}

.contam {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.contam-row {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.contam-row span:first-child {
  color: var(--muted);
}

.bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--positive);
}

.bar.over > i {
  background: var(--negative);
}

.banner {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.banner.warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.banner.muted-box {
  color: var(--muted);
}
