:root {
  --bg: #ffffff; --card: #ffffff; --text: #1c1b1f; --muted: #6b6870; --line: #e6e3ea;
  --accent: #1f7a4d; --accent-text: #ffffff; --chip: #eef1ec; --error: #b3261e;
  color-scheme: light; /* always white: the owner's choice, photos on white */
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); padding-bottom: 88px; }
header { padding: 16px; }
h1 { margin: 0; font-size: 24px; }
.badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 600; }
.note { margin: 8px 0 0; }
.asof, .small { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.loading { padding: 16px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 8px; }
.chip { flex: none; border: 0; border-radius: 18px; padding: 8px 14px; background: var(--chip); color: var(--text); font-size: 15px; }
.chip.on { background: var(--accent); color: var(--accent-text); }
#items { padding: 0 16px; display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.photo { width: 72px; height: 72px; flex: none; border-radius: 10px; object-fit: cover; background: var(--chip); }
.photo.none { display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--muted); }
.info { flex: 1; min-width: 0; }
.iname { font-weight: 600; overflow-wrap: anywhere; }
.price { color: var(--muted); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; flex: none; }
.round { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 22px; line-height: 1; }
.round.add { background: var(--accent); color: var(--accent-text); border: 0; }
.q { min-width: 28px; text-align: center; font-weight: 700; }
.bar { position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 14px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-size: 17px; font-weight: 700; }
.sheet { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); padding: 16px 16px 32px; }
.sheethead { display: flex; justify-content: space-between; align-items: center; }
.sheethead h2 { margin: 0; }
.link { border: 0; background: none; color: var(--accent); font-size: 16px; padding: 8px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.amt { flex: none; }
.total { font-weight: 700; font-size: 18px; padding: 12px 0; }
.types { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0 8px; }
.type { display: flex; align-items: center; gap: 4px; }
label { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }
input:not([type=radio]) { display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.error { color: var(--error); min-height: 1.2em; }
.locbtn { width: 100%; margin-top: 10px; padding: 14px; border: 2px solid var(--accent); border-radius: 14px; background: var(--card); color: var(--accent); font-size: 17px; font-weight: 700; }
.locbtn.done { background: var(--chip); }
.send { width: 100%; padding: 16px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-size: 18px; font-weight: 700; margin-top: 4px; }
[hidden] { display: none !important; }
