:root {
  --bg: #f6f4ef; --card: #fff; --ink: #2b2a27; --muted: #7a766d; --line: #e3dfd5;
  --brand: #6b4f2a; --ok: #2f7d4f; --bad: #b23b3b; --warn: #c27c0e; --hi: #fdecec;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand span { font-weight: 400; opacity: .85; margin-left: 6px; }
.who select { margin-left: 6px; padding: 4px 6px; border-radius: 6px; border: 0; }
.summary { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px 0; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.chip b { font-size: 20px; margin-right: 4px; }
.chip.hi { border-color: var(--bad); color: var(--bad); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 20px; }
.filters, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
select, input, button, textarea { font: inherit; }
.filters select, .filters input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
button { padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; background: var(--brand); color: #fff; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
button.ok { background: var(--ok); }
button.bad { background: #fff; color: var(--bad); border-color: var(--bad); }
.batchbar { position: sticky; top: 52px; z-index: 4; margin: 0 20px 10px; padding: 10px 14px; background: #fff8e6; border: 1px solid var(--warn); border-radius: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
main { display: grid; grid-template-columns: 1fr 320px; gap: 16px; padding: 0 20px 40px; }
@media (max-width: 900px) { main { grid-template-columns: 1fr; } }
.list { display: flex; flex-direction: column; gap: 12px; }
.empty { color: var(--muted); padding: 30px; text-align: center; background: #fff; border-radius: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card.high { border-left: 5px solid var(--bad); background: linear-gradient(90deg, var(--hi), #fff 30%); }
.card.medium { border-left: 5px solid var(--warn); }
@media (max-width: 700px) { .card { grid-template-columns: 1fr; } }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tag { padding: 1px 8px; border-radius: 999px; background: #efebe2; color: var(--ink); font-size: 12px; }
.tag.plat { background: #e7eef7; }
.tag.u-high { background: var(--bad); color: #fff; }
.tag.u-medium { background: var(--warn); color: #fff; }
.author { font-weight: 600; color: var(--ink); }
.text { white-space: pre-wrap; line-height: 1.6; }
.reasons { font-size: 12px; color: var(--muted); margin-top: 6px; }
.reply label { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
textarea { width: 100%; min-height: 96px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; line-height: 1.5; }
textarea[readonly] { background: #faf9f6; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.votes { font-size: 13px; color: var(--muted); margin-top: 6px; }
.votes b { color: var(--ok); }
.claimed { font-size: 13px; color: var(--warn); }
.statusline { font-size: 13px; margin-top: 6px; }
.statusline.sent { color: var(--ok); }
.statusline.rejected { color: var(--bad); }
.pick { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
aside h3 { font-size: 14px; margin: 0 0 8px; color: var(--brand); }
.outbox, .log { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; max-height: 320px; overflow: auto; margin-bottom: 16px; font-size: 13px; }
.msg { border-bottom: 1px dashed var(--line); padding: 6px 2px; white-space: pre-wrap; }
.msg:last-child { border-bottom: 0; }
.msg small { color: var(--muted); display: block; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 10; }

/* ---- 簡化版介面 ---- */
main.single { grid-template-columns: 1fr; max-width: 1100px; margin: 0 auto; }
.who b { margin: 0 4px; }
button.link { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0 4px; }
.statusline button.link { color: var(--brand); }
header button.link { color: #fff; }
.headlink { color: #fff; }
button.big { min-width: 84px; padding: 8px 16px; font-size: 15px; }
.note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.foot { text-align: center; padding: 10px 0 30px; font-size: 13px; }
.foot a { color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal-box { background: #fff; border-radius: 12px; padding: 22px; width: min(92vw, 380px); }
.modal-box h2 { margin: 0 0 4px; font-size: 19px; color: var(--brand); }
.picker-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.picker-list button { padding: 12px; font-size: 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 20px 40px; }
.admin-grid .outbox, .admin-grid .log { max-height: 60vh; }

@media (max-width: 700px) {
  header { padding: 10px 12px; }
  .brand { font-size: 16px; }
  .summary { padding: 10px 12px 0; gap: 6px; }
  .chip { padding: 6px 10px; flex: 1 1 40%; text-align: center; }
  .toolbar { padding: 10px 12px; }
  .filters { width: 100%; }
  .filters select, .filters input { flex: 1 1 45%; padding: 10px 8px; font-size: 16px; }
  main, main.single { padding: 0 10px 30px; }
  .card { grid-template-columns: 1fr; padding: 12px; }
  textarea { font-size: 16px; min-height: 120px; }
  .btns { gap: 8px; }
  button.big { flex: 1 1 30%; min-height: 46px; font-size: 16px; }
  .batchbar { margin: 0 10px 10px; top: 46px; }
  .admin-grid { grid-template-columns: 1fr; padding: 0 10px 30px; }
}
