/* Shrink: the same navy, mint and cream as the rest of stevensbored. One column, a phone first. */
:root {
  --bg: #0c1020;
  --panel: #171b2b;
  --line: #2a3048;
  --ink: #f4ede6;
  --dim: #a9adc0;
  --mint: #acf8b4;
  --warm: #ffa470;
  --focus: #ffffff;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(172, 248, 180, .2); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 5; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input.sr:focus-visible + .drop-note, .drop:focus-within .pick { outline: 3px solid var(--focus); outline-offset: 3px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.home { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 700; }
.home b { color: var(--mint); }
.home:hover { text-decoration: underline; text-underline-offset: 4px; }
h1 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--dim); }

main { width: min(100%, 720px); margin: 0 auto; padding: 20px 16px 48px; }
.lead { margin: 0 0 22px; max-width: 62ch; }

/* how small: three choices side by side on a wide screen, stacked on a phone */
.modes { border: 0; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.modes legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.mode { position: relative; display: grid; gap: 4px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mode-name { font-weight: 700; }
.mode-note { font-size: .88rem; line-height: 1.4; color: var(--dim); }
.mode:has(input:checked) { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.mode:has(input:checked) .mode-name { color: var(--mint); }
.mode:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

.drop { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; }
.drop.over { border-color: var(--mint); background: rgba(172, 248, 180, .06); }
.drop-note { margin: 0; color: var(--dim); font-size: .92rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--dim); }
.btn:disabled { color: #6b7088; cursor: default; }
.btn-main { background: var(--mint); border-color: var(--mint); color: #0c1020; }
.btn-main:hover:not(:disabled) { background: #c5fbcb; border-color: #c5fbcb; }
.btn-main:disabled { background: var(--panel); border-color: var(--line); }
.btn-quiet { background: transparent; color: var(--dim); font-weight: 500; }
.pick { min-width: 220px; min-height: 52px; font-size: 1.05rem; }

.results { margin-top: 22px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.thumb { width: 64px; height: 64px; border-radius: 8px; background: #0f1426; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item.busy .thumb { background: repeating-linear-gradient(135deg, #0f1426 0 8px, #141a30 8px 16px); }
.body { min-width: 0; }
.body p { margin: 0; }
.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sizes { font-variant-numeric: tabular-nums; }
.before { color: var(--dim); }
.arrow { color: var(--dim); }
.after { color: var(--mint); }
.less { color: var(--dim); }
.note { font-size: .88rem; color: var(--dim); }
.item.kept .note { color: var(--ink); }
.actions { display: flex; flex-direction: column; gap: 6px; }
.actions .btn { min-width: 84px; padding: 0 14px; }

.totals { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.total { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.total-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.fine { margin: 28px 0 0; font-size: .88rem; color: var(--dim); max-width: 62ch; }

@media (max-width: 460px) {
  .item { grid-template-columns: 56px minmax(0, 1fr); }
  .thumb { width: 56px; height: 56px; }
  .actions { grid-column: 1 / -1; flex-direction: row; }
  .actions .btn { flex: 1; }
  .total-actions, .total-actions .btn { width: 100%; }
}
