:root {
  --bg: #14161a;
  --panel: #1c1f26;
  --line: #2b3038;
  --text: #e6e8ec;
  --dim: #9aa3af;
  --ok: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --accent: #60a5fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
}

a { color: var(--accent); }

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  color: var(--dim);
}

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-weight: 600; text-decoration: none; color: var(--text); }
.spacer { flex: 1; }
.build { color: var(--dim); font-size: 12px; font-family: ui-monospace, monospace; }

/* Dry-run state is permanent furniture in the header, not a Settings detail. */
.pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-dry  { background: #1e3a5f; color: #93c5fd; border: 1px solid #2f5c8f; }
.pill-live { background: #4c1d1d; color: #fca5a5; border: 1px solid #7f2d2d; }

.switcher { display: flex; align-items: center; gap: 6px; }
.switcher label { color: var(--dim); font-size: 13px; }
.switcher select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
}

.banner { padding: 10px 18px; font-size: 14px; }
.banner-bad { background: #3b1414; color: #fca5a5; border-bottom: 1px solid #7f2d2d; }

main { padding: 22px; max-width: 1100px; }

h1 { font-size: 20px; margin: 0 0 18px; }
h2 { font-size: 15px; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.card.wide { grid-column: 1 / -1; }

dl { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; }
dt { color: var(--dim); }
dd { margin: 0; word-break: break-all; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.ok  { color: var(--ok); }
.bad { color: var(--bad); }
.note { color: var(--dim); font-size: 13px; }

.nav { display: flex; gap: 12px; }
.nav a { color: var(--dim); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--text); }

/* Asset grid. Tiles are big enough to judge an image by — the review screen
   proper goes further (2–3 across), but a contact sheet is useless for both. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.tile {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.tile img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #0c0e11;
}
.tile figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.fname {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta { font-size: 11px; color: var(--dim); }
.badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; min-height: 16px; }
.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #2b3038;
  color: var(--dim);
}
.badge-live { background: #1e3a5f; color: #93c5fd; }
.badge-vid  { background: #3b2f14; color: #fcd34d; }
.badge-fav  { background: #3a2a12; color: var(--warn); }

.pager { display: flex; gap: 16px; align-items: center; margin: 22px 0 40px; }

.mini { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; display: block; background: #0c0e11; }

button {
  background: #2b3038;
  color: var(--text);
  border: 1px solid #3a4149;
  border-radius: 6px;
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
button:hover { background: #343b45; }
button[disabled] { opacity: 0.5; cursor: default; }

.banner-dry { background: #14243b; color: #93c5fd; border-bottom: 1px solid #2f5c8f; }

.modebar {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 10px 0 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.modebar .dim { color: var(--dim); }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.segmented a {
  padding: 5px 16px;
  font-size: 13px;
  text-decoration: none;
  color: var(--dim);
  background: var(--panel);
}
.segmented a.on { background: #2f6b3f; color: #eafff0; font-weight: 600; }
.segmented a:not(.on):hover { background: #262b33; color: var(--text); }

details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸ "; color: var(--dim); }
details.card[open] > summary::before { content: "▾ "; }
.inline-h2 { display: inline; font-size: 15px; }
details.card h3 { font-size: 13px; color: var(--dim); margin: 18px 0 8px; }

input[type="password"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
}

.progress-bar {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 0 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.progress-bar .dim { color: var(--dim); }

/* Tiles big enough to actually judge an image by. A contact sheet is the wrong
   shape for this job: the decision is "is this one sharper than that one", and
   that is not answerable at thumbnail size. */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 90px;
}
.rtile {
  margin: 0;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.rtile-pick { box-shadow: 0 0 0 1px #4ade8055; }
.pick-badge {
  margin-left: auto;
  background: #14361f;
  color: #86efac;
  border: 1px solid #2f6b3f;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/* One-at-a-time review is a rhythm: look, decide, look, decide. The buttons
   have to be hittable without aiming, and distinguishable without reading. */
.bigbtn {
  font-size: 16px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 9px;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bigbtn kbd {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.16);
  font-size: 11px;
}
/* A receipt for the previous confirm. Without it you agree to something, the
   screen advances, and there is no way to check what you agreed to. */
.receipt {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.receipt code { color: var(--text); }
.inline-form { margin-top: 6px; }
.badge-warn { background: #4a3410; color: #fcd34d; }

.btn-keep  { background: #1c4a2c; border-color: #2f6b3f; color: #b7f5c9; }
.btn-keep:hover  { background: #245c37; }
.btn-trash { background: #4c1d1d; border-color: #7f2d2d; color: #fca5a5; }
.btn-trash:hover { background: #5e2424; }
.btn-skip  { background: #2b3038; border-color: #3a4149; color: var(--dim); }
.btn-skip:hover  { background: #343b45; color: var(--text); }

.locked-control { display: flex; gap: 16px; align-items: flex-start; }
.locked-control > div { flex: 1; }
.locked-control pre.req { margin-top: 8px; white-space: pre-wrap; }

.single-media {
  position: relative;
  background: #0c0e11;
  border-radius: 8px;
  margin-bottom: 90px;
  overflow: hidden;
}
.single-media img, .single-media video {
  display: block;
  width: 100%;
  max-height: 66vh;
  object-fit: contain;
  background: #0c0e11;
}
.single-media video { position: absolute; inset: 0; height: 100%; }

.solo-video {
  width: 100%;
  max-height: 62vh;
  background: #0c0e11;
  border-radius: 8px;
  margin-bottom: 90px;
  display: block;
}

label.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  font-size: 13px;
  color: var(--dim);
  cursor: pointer;
}
.slider-row { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.slider-row input[type=range] { flex: 1; max-width: 480px; accent-color: var(--accent); }
.slider-row output {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  min-width: 52px;
}

.btn-group { display: flex; gap: 1px; }
.btn-group button:first-child { border-radius: 6px 0 0 6px; }
.btn-group button:last-child { border-radius: 0 6px 6px 0; }

.rtile:has(input:checked) { border-color: #2f6b3f; }
.rtile:has(input:not(:checked)) { border-color: #6b2f2f; opacity: 0.72; }
.rtile label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
}
.rtile input[type=checkbox] { width: 16px; height: 16px; accent-color: #4ade80; }
.ticklabel b {
  display: inline-block;
  min-width: 16px;
  text-align: center;
  background: #2b3038;
  border-radius: 3px;
  font-size: 11px;
  padding: 0 4px;
  margin-left: 4px;
}
.rmedia { position: relative; background: #0c0e11; }
.rmedia img, .rmedia video {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #0c0e11;
}
.rmedia video { position: absolute; inset: 0; }
.rtile figcaption { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 5px; }

.footer-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 22px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  z-index: 20;
}
#confirm { background: #3b2020; border-color: #7f2d2d; color: #fca5a5; }
#confirm:hover { background: #4a2727; }

.help summary { cursor: pointer; color: var(--dim); font-size: 13px; }
table.keys { font-size: 12px; margin-top: 8px; }
table.keys td { border: 0; padding: 2px 10px 2px 0; }
kbd {
  background: #2b3038;
  border: 1px solid #3a4149;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

table.kv { font-size: 13px; }
table.kv th { width: 150px; text-transform: none; letter-spacing: 0; font-size: 13px; }

pre.req {
  background: #0c0e11;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.45;
  color: #cbd5e1;
}

.trial-img { max-width: 100%; max-height: 420px; border-radius: 6px; display: block; }
.actions { display: flex; gap: 10px; margin-top: 14px; }

input[type="text"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
}

.cluster { margin-bottom: 14px; }
.strip { display: flex; gap: 6px; overflow-x: auto; align-items: center; padding-bottom: 4px; }
.strip img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
  background: #0c0e11;
}

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
}
