:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1c2430; --muted: #5d6878; --line: #dde2e8;
  --brand: #1b4f72; --brand-dark: #153e5a; --ok: #1e7a4c; --ok-bg: #e7f5ee;
  --err: #a32d2d; --err-bg: #fcebeb; --info-bg: #eaf1f8; --warn-bg: #fdf3dc; --warn: #7a5200;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
header.top { background: var(--card); border-bottom: 1px solid var(--line); }
header.top .inner, main { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.top .inner { display: flex; align-items: center; gap: 24px; height: 56px; }
header.top .brand { font-weight: 600; color: var(--text); text-decoration: none; }
header.top .tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--info-bg); color: var(--brand); margin-left: 8px; }
header.top nav { display: flex; gap: 18px; flex: 1; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a:hover { color: var(--text); }
header.top .who { color: var(--muted); font-size: 13px; }
main { padding-top: 28px; padding-bottom: 60px; }
main.narrow { max-width: 440px; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat .n { font-size: 26px; font-weight: 600; }
.stat .l { color: var(--muted); font-size: 13px; }
label { display: block; font-weight: 500; margin: 14px 0 5px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 9px 11px; border: 1px solid #c3cad3; border-radius: 7px; font: inherit; background: #fff; color: var(--text); }
input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid #c3cad3; border-radius: 7px; background: #fff; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid #378add; outline-offset: 1px; }
input.code { font-size: 22px; letter-spacing: 6px; text-align: center; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input[type=text], .inline input[type=email], .inline select { width: auto; flex: 1; min-width: 150px; }
button, .btn { display: inline-block; padding: 9px 16px; border-radius: 7px; border: 1px solid var(--brand); background: var(--brand);
  color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--brand-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--brand); }
button.secondary:hover, .btn.secondary:hover { background: var(--info-bg); }
button.danger { background: #fff; color: var(--err); border-color: #d9a3a3; }
button.danger:hover { background: var(--err-bg); }
button.small { padding: 5px 10px; font-size: 13px; }
button.link { background: none; border: 0; color: var(--muted); padding: 0; font-weight: 400; }
button.link:hover { background: none; color: var(--text); text-decoration: underline; }
.actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td form { display: inline; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.badge.off { background: #eceff3; color: var(--muted); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.info { background: var(--info-bg); color: var(--brand); }
.flash.secret { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a5; font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
pre { background: #f0f2f5; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; margin: 8px 0 0; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.qr { text-align: center; margin: 14px 0; }
.qr svg { width: 260px; height: 260px; }
.empty { color: var(--muted); padding: 8px 0; }
/* scheduling */
input[type=number], input[type=time], input[type=date], input[type=tel], textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #c3cad3; border-radius: 7px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 80px; resize: vertical; }
textarea:focus { outline: 2px solid #378add; outline-offset: 1px; }
.inline input[type=number], .inline input[type=time], .inline input[type=date] { width: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.tabs a.on { background: var(--card); border-color: var(--line); color: var(--text); font-weight: 500; }
.hours td { vertical-align: middle; }
.hours input[type=time] { width: 130px; }
.prose h2 { margin-top: 22px; }
.prose li { margin-bottom: 6px; }
.detail td:first-child { width: 150px; color: var(--muted); }
.prewrap { white-space: pre-wrap; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.badge.bad { background: var(--err-bg); color: var(--err); }
