:root {
  --ink: #111; --muted: #6b6b6b; --line: #e8e6e1; --bg: #f6f4f0; --card: #fff;
  --accent: #111; --pop: #e8432e; --ok: #1f7a4d;
  --r: 14px;
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; padding-bottom: 150px; }
.top { padding: 22px 18px 10px; max-width: 720px; margin: 0 auto; }
.brand { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.brand span { color: var(--pop); }
.sub { color: var(--muted); margin-top: 2px; }
main { max-width: 720px; margin: 0 auto; padding: 0 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
label { font-weight: 700; display: block; margin-bottom: 8px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; direction: ltr; text-align: left; background: #fbfaf8; }
textarea:focus { outline: 2px solid var(--ink); border-color: transparent; }
.row { display: flex; gap: 8px; margin-top: 10px; }
button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--ink); padding: 11px 16px; }
.primary { background: var(--ink); color: #fff; flex: 1; font-weight: 700; }
.primary:disabled { opacity: .5; cursor: wait; }
.ghost { background: transparent; color: var(--ink); }
.err { color: var(--pop); margin: 10px 0 0; font-weight: 600; }
.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; margin: 0 auto 10px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.meta { color: var(--muted); margin: 18px 2px 8px; font-size: 13px; }
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; align-items: center; }
.item.off { opacity: .45; }
.item img { width: 76px; height: 100px; object-fit: cover; border-radius: 8px; background: #eee; }
.name { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.attr { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.price { margin-top: 6px; }
.price b { font-size: 15px; }
.price s { color: var(--muted); font-size: 12px; margin-inline-start: 6px; }
.qty { display: grid; grid-template-columns: 34px 30px 34px; align-items: center; text-align: center; gap: 2px; }
.qty button { padding: 0; height: 34px; font-size: 18px; background: #fff; border-color: var(--line); }
.qty output { font-weight: 700; }
.qty .line { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 6px; }
.dim .item { opacity: .55; grid-template-columns: 56px 1fr; }
.dim .item img { width: 56px; height: 72px; }
.gone { margin-top: 14px; }
.gone summary { cursor: pointer; color: var(--muted); padding: 6px 2px; }
.note { color: var(--muted); font-size: 12.5px; margin: 14px 2px; }
.bar { position: fixed; inset: auto 0 0 0; background: var(--ink); color: #fff; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.bar .lines { display: grid; gap: 2px; font-size: 12.5px; }
.bar .lines div { display: flex; gap: 8px; justify-content: space-between; min-width: 190px; }
.bar .lines span { opacity: .7; }
.bar .total { text-align: left; }
.bar .total span { display: block; font-size: 12px; opacity: .7; }
.bar .total b { font-size: 24px; }
@media (min-width: 760px) { .bar { justify-content: center; gap: 60px; } }
