:root { --brand: #5f0080; --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --muted: #6e6e73; --line: #e5e5ea; --warn: #c92a2a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--brand); }
.top a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 18px; }
main { max-width: 640px; margin: 0 auto; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.card { display: block; background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 12px; color: inherit; text-decoration: none; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
label { font-weight: 600; }
input, select, button { font: inherit; min-height: 44px; border-radius: 10px; }
input, select { width: 100%; padding: 8px 12px; border: 1px solid var(--line); background: #fff; }
.row select, .row input.short { width: auto; max-width: 9em; }
input[type=checkbox] { width: 24px; min-height: 24px; accent-color: var(--brand); }
button { width: 100%; border: 0; padding: 10px 14px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
button.small { width: auto; }
button.secondary { background: var(--line); color: var(--text); }
button.danger { background: #fff; color: var(--warn); border: 1px solid var(--warn); }
.error { background: #fff0f0; color: var(--warn); padding: 12px 16px; border-radius: 10px; }
.empty, .muted { color: var(--muted); }
.muted { font-size: 14px; margin: 0; }
.cards { list-style: none; padding: 0; margin: 0; }
.product { display: flex; gap: 12px; }
.product img, .head img { width: 72px; height: 94px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.info { display: flex; flex-direction: column; min-width: 0; }
.name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price { font-size: 18px; font-weight: 700; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--muted); width: fit-content; }
.badge.warn { background: #fff0f0; color: var(--warn); }
.warn-text { color: var(--warn); }
.head { display: flex; gap: 12px; align-items: flex-start; }
.head h1 { font-size: 18px; margin: 0 0 4px; }
.head a { color: var(--brand); }
.seg { display: flex; gap: 6px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 36px; background: var(--bg); color: var(--text); }
.seg button[aria-pressed=true] { background: var(--brand); color: #fff; }
.chart { position: relative; height: 260px; }
