:root {
  --red: #b50d12; --ink: #16181d; --muted: #6b7280; --line: #e5e7eb;
  --bg: #f4f5f7; --card: #fff; --ok: #0f9d58;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 16px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 10px; }
p.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 14px; margin: -2px 0 8px; }
input[type=text], input[type=number], input[type=date], input[type=tel], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.btn { display: inline-block; padding: 13px 18px; border: 0; border-radius: 10px; background: var(--red);
       color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn.secondary { background: #eef0f3; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.small { padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.opts label { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 0 0 8px; }
.opts input { width: auto; }
.scale { display: flex; gap: 8px; flex-wrap: wrap; }
.scale button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
                background: #fff; font: inherit; cursor: pointer; }
.scale button.on { background: var(--red); color: #fff; border-color: var(--red); }
.q { border-bottom: 1px solid var(--line); padding: 14px 0; }
.q:last-child { border-bottom: 0; }
.req { color: var(--red); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #16181d;
         color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 9; max-width: 90%; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag.draft { background: #fff4d6; color: #8a6100; }
.tag.open { background: #e3f6e9; color: var(--ok); }
.tag.closed { background: #eef0f3; color: var(--muted); }
.list-item { display: flex; justify-content: space-between; gap: 12px; align-items: center;
             padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item b { display: block; }
.list-item span { color: var(--muted); font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.scroll { overflow-x: auto; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.ok-screen { text-align: center; padding: 50px 10px; }
.ok-screen .mark { font-size: 46px; }
code { background: #eef0f3; padding: 2px 6px; border-radius: 6px; font-size: 14px; word-break: break-all; }
