
:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #5d6675; --line: #e2e5ea;
  --accent: #1f6feb; --accent-ink: #fff; --ok: #1a7f37; --ok-bg: #e7f5ec; --warn: #9a6700; --warn-bg: #fff4d6;
  --bad: #c62828; --bad-bg: #fdecec; --info-bg: #eaf2ff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.7 "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1440px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 56px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
nav a[aria-current] { color: var(--accent); background: var(--info-bg); font-weight: 700; }
.logout { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { color: var(--muted); font-size: 13px; }
main { padding-top: 24px; padding-bottom: 64px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 8px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
label { display: block; font-weight: 700; margin: 14px 0 4px; }
label .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 6px; }
button, .button { display: inline-block; border: 0; border-radius: 8px; padding: 9px 18px; font: inherit; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
button.secondary, .button.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--bad); }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stat b { display: block; font-size: 24px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--line); color: var(--muted); }
.mark.done { background: var(--ok); color: #fff; }
.copy { display: flex; gap: 8px; margin-top: 8px; }
.copy input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.record { border-top: 1px solid var(--line); padding: 14px 0; }
.record:first-of-type { border-top: 0; }
.record-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bubble { white-space: pre-wrap; border-radius: 8px; padding: 10px 12px; margin-top: 8px; overflow-wrap: anywhere; }
.bubble.guest { background: var(--bg); }
.bubble.reply { background: var(--info-bg); }
.bubble-label { font-size: 12px; color: var(--muted); font-weight: 700; display: block; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: #fff; font-size: 14px; }
.filters a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.item-grid { display: grid; grid-template-columns: 160px 1fr; gap: 0 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .item-grid, .row2 { grid-template-columns: 1fr; } .logout { margin-left: 0; } }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 13px; color: var(--muted); border-top: 0; }
.turn-head { margin-top: 8px; }
.rate { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rate input { flex: 1; min-width: 200px; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compare.cols-1 { grid-template-columns: 1fr; }
.compare.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compare.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }
.cell { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.cell .bubble { margin-top: 6px; }
.cell .rate input { min-width: 120px; }
.lab-message { font-weight: 700; margin: 18px 0 8px; white-space: pre-wrap; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
