:root {
  --bg: #16161c;
  --panel: #202028;
  --panel2: #2a2a34;
  --line: #34343f;
  --text: #ecebf2;
  --muted: #9a98a8;
  --accent: #b39ddb;
  --accent-strong: #8e6fcf;
  --ok: #5fbf7f;
  --warn: #e0b23a;
  --bad: #e06464;
  --r: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
input { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus { outline: 2px solid var(--accent-strong); outline-offset: -1px; }
input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--accent-strong); }
input[type="date"] { width: auto; }

main { padding: 12px 12px calc(40px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: rgba(22, 22, 28, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.top h1 { flex: 1; font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 34px; height: 34px; }
.icon { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; border-radius: 10px; color: var(--muted); }
.icon:active { background: var(--panel2); }
.pill { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }

/* generic */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--panel); margin: 0; }
.note.warn { color: var(--warn); border: 1px solid #5a4a1c; }
.big { min-height: 52px; padding: 12px 16px; border-radius: var(--r); background: var(--panel2); font-weight: 600; text-align: center; }
.primary { background: var(--accent-strong); color: #fff; }
.ghost { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--accent); text-align: center; }
.ghost.small { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.wide { width: 100%; }
.label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form label > input, .form label > .seg { color: var(--text); font-size: 16px; }
.toggle { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; }

.seg { display: flex; background: var(--panel2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 40px; border-radius: 8px; text-align: center; color: var(--muted); font-size: 15px; }
.seg button.on { background: var(--accent-strong); color: #fff; }

/* who */
.who { align-items: center; text-align: center; padding-top: 12vh; }
.who h1 { margin: 4px 0 0; }
.logo-big { width: 120px; height: 120px; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; }

/* trips */
.trip { display: block; width: 100%; padding: 14px; }
.trip-name { font-weight: 600; font-size: 17px; margin-bottom: 2px; }
.archived summary { color: var(--muted); padding: 8px 2px; }
.archived .trip { margin-top: 8px; opacity: 0.7; }
.stop-row { display: flex; gap: 6px; align-items: center; }
.stop-row input[type="date"] { max-width: 150px; }

/* trip: stops */
.stops { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 10px 12px 4px; max-width: 720px; margin: 0 auto; scrollbar-width: none; }
.stops .arrow { color: var(--muted); }
.stop { flex: none; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: center; font-size: 14px; }
.stop .small { color: var(--muted); font-size: 12px; }
.stop.on { border-color: var(--accent-strong); background: #2d2540; }
.stop.done .small { color: var(--ok); }
.progress-wrap { padding: 8px 12px 0; max-width: 720px; margin: 0 auto; }
.progress { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.bar { height: 100%; background: var(--ok); transition: width 0.25s; }
.progress-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); padding-top: 6px; }

/* containers & items */
.containers { gap: 10px; }
.c-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; min-height: 52px; }
.c-name { flex: 1; font-weight: 600; }
.chev { color: var(--muted); width: 14px; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.container.complete .count { color: var(--ok); }
.container.complete .c-name::after { content: " ✓"; color: var(--ok); }
.row { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 10px; border-top: 1px solid var(--line); min-height: 52px; }
.row.dim { color: var(--muted); }
.item .name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 0; }
.tick { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 2px solid #55546a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.item.ok .tick { background: var(--ok); border-color: var(--ok); color: #10200f; }
.item.ok .name > span:first-child { color: var(--muted); }
.item.missing .tick { border-color: var(--bad); color: var(--bad); }
.item.unsure .tick { border-color: var(--warn); color: var(--warn); }
.qty { color: var(--accent); font-weight: 600; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--panel2); color: var(--muted); }
.meta { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.item.missing .meta { color: var(--bad); }
.more { font-size: 20px; }
.add input { min-height: 40px; background: transparent; border-style: dashed; }
.excluded summary { padding: 10px 14px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* settings */
.info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }

/* bottom sheet */
#sheet[hidden] { display: none; }
#sheet { position: fixed; inset: 0; z-index: 20; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: var(--panel); border-radius: 16px 16px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; max-width: 720px; margin: 0 auto; }
.sheet-title { font-weight: 600; font-size: 17px; padding: 4px 4px 8px; }
.action { min-height: 50px; padding: 0 14px; border-radius: 10px; background: var(--panel2); }
.action.danger { color: var(--bad); }
.history { padding: 0 4px 6px; }

/* inventory editor, trip notes */
.c-head .c-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.c-head .more { margin-right: -8px; }
.trip-note { flex-basis: 100%; font-size: 13px; color: var(--warn); }

/* compact item rows (Alexander, 2026-11-09: rows ~1.5-2x lower, check info pale and on the side) */
.row { min-height: 0; padding: 2px 6px 2px 10px; gap: 8px; }
.item .name { padding: 4px 0; gap: 2px 6px; align-items: center; }
.tick { width: 24px; height: 24px; border-radius: 6px; border-width: 2px; font-size: 14px; }
.item .meta { flex-basis: auto; margin-left: auto; font-size: 11px; opacity: 0.55; white-space: nowrap; }
.item.missing .meta { opacity: 0.9; }
.row .icon.more { min-width: 32px; height: 30px; font-size: 18px; }
.trip-note { order: 10; }
.add input { min-height: 32px; padding: 4px 10px; font-size: 14px; }
.ghost.small { min-height: 30px; }

/* full band logo (always use "Logo on Lilac.png") */
.logo { width: 40px; height: 40px; border-radius: 8px; }
.logo-big { width: 220px; height: 220px; border-radius: 16px; }
