:root {
  color-scheme: dark;
  --bg: #12141a;
  --surface: #1b1e27;
  --line: #3a4254;
  --text: #e8eaed;
  --muted: #b8c0cc;
  --focus: #8ab4ff;
  --configured: #7dcea0;
  --configured-bg: #163326;
  --suggested: #e8c36a;
  --suggested-bg: #3a2e12;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--surface);
  color: var(--text);
  padding: 8px;
}
.skip-link:focus { top: 8px; }

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: end;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

h1 { font-size: 20px; margin: 0 0 4px; font-weight: 650; }
.note { margin: 0; color: var(--suggested); max-width: 42rem; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

input, select, button {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
}
button { background: var(--configured-bg); color: var(--configured); cursor: pointer; }
input:focus, select:focus, button:focus { outline: 2px solid var(--focus); outline-offset: 2px; }

.status { margin: 12px 20px; color: var(--muted); }
main { padding: 0 20px 32px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.item-line { display: flex; gap: 8px; align-items: center; }
.icon-slot {
  width: 36px;
  height: 32px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #161922;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.item-sprite {
  width: 36px;
  height: 32px;
  display: block;
  image-rendering: pixelated;
}
.item-id { color: var(--muted); font-family: var(--mono); font-size: 14px; }
.sources { color: var(--muted); font-size: 14px; max-width: 28rem; }
.choice { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.choice label { display: inline-flex; gap: 4px; align-items: center; }
.amount { width: 7rem; }
.amount:disabled { opacity: 0.45; }
tr[hidden] { display: none; }
#preview {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: auto;
  font-family: var(--mono);
  font-size: 14px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
