:root {
  --ink: #1d2320;
  --muted: #66706b;
  --line: #dde3e0;
  --bg: #f5f7f6;
  --card: #fff;
  --accent: #0b6b4f;
  --accent-ink: #fff;
  --red: #c2352b;
  --red-bg: #fdf0ef;
  --amber: #8a5a00;
  --amber-bg: #fff6e0;
  --green: #1d7a4d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); padding-bottom: 80px; }
button, input, select, textarea { font: inherit; color: inherit; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 16px; margin: 0 12px 0 0; letter-spacing: .01em; }
.shop { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.shop select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-width: 220px; }
.shop-status { color: var(--muted); }
.shop-status.ok { color: var(--green); }
.shop-status.bad { color: var(--red); }

main { max-width: 1180px; margin: 0 auto; padding: 20px 24px; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--amber-bg); color: var(--amber); }
.notice.error { background: var(--red-bg); color: var(--red); }

.btn { padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #b8c2bd; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.quiet { border-color: transparent; background: none; color: var(--muted); }
.btn.small { padding: 3px 10px; font-size: 13px; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; border: 2px dashed #b9c4be; border-radius: 12px; background: #fff; color: var(--muted); cursor: pointer; text-align: center; padding: 20px; }
.drop b { color: var(--ink); font-size: 16px; }
.drop.over { border-color: var(--accent); background: #eef7f3; }
.drop.small { min-height: 64px; flex-direction: row; gap: 10px; }
.drop.busy { cursor: progress; opacity: .7; }

#review { margin-top: 18px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; margin-bottom: 14px; }
.banner b { font-size: 17px; }
.banner.warn { background: var(--red); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.card.bad { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.card.done { border-color: #a9d6bf; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.pill { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: #eef1f0; color: var(--muted); white-space: nowrap; }
.pill.bad { background: var(--red-bg); color: var(--red); }
.pill.ok { background: #e6f4ec; color: var(--green); }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.grow { flex: 1; }

.media { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.tile { flex: none; width: 150px; }
.thumb { position: relative; width: 150px; height: 112px; border-radius: 8px; overflow: hidden; background: #e9edeb; border: 1px solid var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .num { position: absolute; top: 6px; left: 6px; min-width: 24px; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.thumb .kind { position: absolute; bottom: 6px; right: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; }
.thumb .first { position: absolute; bottom: 6px; left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; }
.tile textarea { width: 100%; margin-top: 6px; height: 64px; resize: vertical; font-size: 12px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; }
.tile .count { font-size: 11px; color: var(--muted); text-align: right; }
.tile .name { font-size: 11px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid { display: grid; grid-template-columns: 1fr 260px; gap: 14px 22px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.field input, .field textarea { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.field textarea.desc { min-height: 150px; resize: vertical; }
.field input.price { font-size: 16px; font-weight: 600; }
.field input.missing { border-color: var(--red); background: var(--red-bg); }
.ro { padding: 7px 0; font-weight: 600; }
.over { color: var(--red); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-height: 38px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 99px; background: #eef1f0; font-size: 13px; }
.chip.bad { background: var(--red-bg); color: var(--red); }
.chip button { border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; padding: 0 4px; font-size: 14px; line-height: 1; }
.chip button:hover { opacity: 1; }
.tags input { flex: 1; min-width: 140px; border: 0; outline: 0; padding: 2px 4px; }

.files { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid #eef1f0; }
.files li span:last-child { color: var(--muted); white-space: nowrap; }

.problems { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; }
.problems li { padding: 4px 10px; border-radius: 6px; margin-top: 4px; }
.problems li.e { background: var(--red-bg); color: var(--red); }
.problems li.w { background: var(--amber-bg); color: var(--amber); }

.progress { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: #f1f4f3; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.progress.ok { background: #e6f4ec; color: var(--green); }
.progress.fail { background: var(--red-bg); color: var(--red); }
.progress a { color: var(--accent); font-weight: 600; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: #fff; border-top: 1px solid var(--line); }
#summary { color: var(--muted); }
