@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #070708;
  --ink: #f3f0e8;
  --muted: #c8c2b4;
  --amber: #e4a04a;
  --line: #2a2a2a;
  --field: #101011;
  --face: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--black);
  color: var(--ink);
  font-family: var(--face);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

::selection { background: var(--amber); color: var(--black); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

html { scrollbar-color: #3a3a3a #070708; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

select {
  background: var(--field);
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid #3a3a3a;
  text-transform: uppercase;
}

.bar p { margin: 0; color: var(--muted); }

.name, .bar button {
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.bar button { color: var(--amber); }

main { padding: 2.5rem 1.25rem 5rem; }

h1 {
  margin: 0 0 1rem;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.login {
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label { display: flex; flex-direction: column; gap: 0.35rem; color: var(--muted); font-size: 0.95rem; text-transform: uppercase; }

input[type="text"], input[type="password"], textarea, input:not([type="checkbox"]):not([type="file"]) {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  text-transform: none;
  letter-spacing: 0.01em;
  caret-color: var(--amber);
}

textarea { min-height: 4.5rem; resize: vertical; }

button[type="submit"], .upload span, .row button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.45rem 0.75rem;
  text-transform: uppercase;
  cursor: pointer;
}

button[type="submit"]:hover, .upload span:hover, .row button:hover { border-color: var(--amber); color: var(--amber); }

button.primary { background: var(--amber); color: var(--black); border-color: var(--amber); font-weight: 600; }
button.primary:hover { color: var(--black); }

.error { min-height: 1.2em; color: #ffb4a8; margin: 0; text-transform: none; }

#desk {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.note { margin: 0 0 1.25rem; max-width: 62ch; color: var(--muted); text-transform: none; letter-spacing: 0.01em; }

.upload {
  display: inline-flex;
  margin-bottom: 1rem;
}

.upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upload input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 3px; }

#queue, #section-list, #plate-list { list-style: none; margin: 0; padding: 0; }

#section-list li, .plate, #queue li {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.row input[type="text"] { flex: 1; min-width: 8rem; }
.checks { display: flex; gap: 1rem; text-transform: uppercase; color: var(--muted); }
.checks label { flex-direction: row; align-items: center; gap: 0.4rem; }

input[type="checkbox"] { accent-color: var(--amber); width: 1rem; height: 1rem; }

.plate { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; }
.plate img { width: 9rem; height: 6rem; object-fit: cover; background: #161616; }
.fields { display: grid; gap: 0.6rem; }
.fields .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

#queue li { color: var(--muted); text-transform: none; }
#queue li.bad { color: #ffb4a8; }

.status {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  min-height: 2.4rem;
  padding: 0.45rem 1.25rem;
  background: var(--black);
  border-top: 1px solid #3a3a3a;
  color: var(--muted);
  text-transform: uppercase;
}

body.is-dropping .plates { outline: 1px solid var(--amber); outline-offset: -1px; }

@media (max-width: 800px) {
  #desk, .plate, .fields .pair { grid-template-columns: 1fr; }
  .plate img { width: 100%; height: 12rem; }
}
