:root {
  --bg: #f5f3ee; --card: #ffffff; --ink: #1f2328; --muted: #5f6670; --line: #e3dfd6;
  --brand: #8a5a13; --brand-soft: #f6ead6; --ok: #1f7a46; --ok-soft: #e3f3e9;
  --wait: #9a6700; --wait-soft: #fff4d6; --bad: #b42318; --bad-soft: #fde8e6; --off: #9aa0a6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 'Sarabun', 'Noto Sans Thai', system-ui, sans-serif; }
#app { max-width: 720px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-size: 24px; line-height: 1.35; margin: 4px 0 4px; }
h2 { font-size: 20px; margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 16px; }
.lead { font-size: 19px; }
.center { text-align: center; }
.big-ico { font-size: 44px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.head { padding: 8px 0 4px; }
.badge { display: inline-block; font-size: 15px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-wait { background: var(--wait-soft); color: var(--wait); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-off { background: #eef0f2; color: var(--muted); }
.notice { border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 17px; }
.n-wait { background: var(--wait-soft); color: #6b4a00; }
.n-bad { background: var(--bad-soft); color: var(--bad); }
.n-ok { background: var(--ok-soft); color: var(--ok); }
button, .btn { font: inherit; font-size: 17px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  min-height: 48px; padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.line-btn { background: #06c755; border-color: #06c755; color: #fff; font-weight: 600; }
.danger { color: var(--bad); }
.block { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; }
.item { border-top: 1px solid var(--line); padding: 12px 0; }
.item:first-of-type { border-top: 0; }
.item .name { font-weight: 600; }
.item .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.item .actions button, .item .actions .btn { min-height: 44px; font-size: 16px; padding: 6px 12px; }
.item.withdrawn { opacity: .55; }
.faded { opacity: .5; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 15px; }
input[type=text], input[type=tel], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: 18px; padding: 12px; border: 1px solid #cfcac0; border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid #e7c88f; border-color: var(--brand); }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfcac0; border-radius: 12px; padding: 12px; margin: 8px 0; font-weight: 400; cursor: pointer; }
.choice input { width: 22px; height: 22px; margin-top: 3px; flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 14px; }
.scale button { min-height: 48px; padding: 0; font-size: 18px; }
.scale button.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.q { margin-top: 10px; }
.cat { margin: 18px 0 2px; color: var(--brand); font-weight: 700; }
.results { max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.res { padding: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.res:first-child { border-top: 0; }
.res:active, .res.on { background: var(--brand-soft); }
.linkbox { word-break: break-all; background: #f7f7f7; border-radius: 10px; padding: 10px; font-size: 15px; user-select: all; }
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
#modal .sheet { background: #fff; width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; }
@media (min-width: 760px) { #modal { align-items: center; } #modal .sheet { border-radius: 18px; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: #1f2328; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 17px; transition: transform .25s; z-index: 60; max-width: 92vw; }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--bad); }
.loading { text-align: center; padding: 60px 0; color: var(--muted); }
.count { font-weight: 400; color: var(--muted); font-size: 16px; }
