:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1f2a2e;
  --ink-2: #52514e;
  --muted: #6b6a65;
  --line: #e1e0d9;
  --accent: #1f6f6b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0ee;
  --error-bg: #fdecea;
  --error-ink: #8a1c12;
  --ok-bg: #e6f4ea;
  --ok-ink: #135c2a;
  /* グラフ（自院=青、競合=グレー。dataviz の検証済みの値） */
  --series-self: #2a78d6;
  --series-comp: #898781;
  --grid: #e1e0d9;
  --axis: #898781;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a1b;
    --surface: #1d2526;
    --ink: #e8eeed;
    --ink-2: #c3c2b7;
    --muted: #9fb0ae;
    --line: #2f3a3b;
    --accent: #5cc0b6;
    --accent-ink: #0d1a19;
    --accent-soft: #1f3533;
    --error-bg: #3b1d1a;
    --error-ink: #f4b4ab;
    --ok-bg: #173323;
    --ok-ink: #9fdcb2;
    --series-self: #3987e5;
    --series-comp: #6f6e69;
    --grid: #2c2c2a;
    --axis: #898781;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.7;
}
a { color: var(--accent); }
code { font-size: 13px; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.brand span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }

.page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
h1 { font-size: 24px; margin: 0 0 4px; line-height: 1.4; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin: 16px 0; scroll-margin-top: 16px; }
.card.narrow { max-width: 480px; margin: 40px auto; }
.tabs { display: flex; gap: 4px; margin: 16px 0 0; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 14px; }

.stack { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: start; }
.grid2 .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input, .row select { width: auto; }

label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); font-size: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input, select, textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input[type="checkbox"] { width: auto; }
input[readonly] { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn { display: inline-block; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 2px 10px; font-size: 13px; }
.btn.danger { color: var(--error-ink); }
.btn:disabled { opacity: .4; cursor: default; }

.alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; font-size: 14px; }
.alert.error { background: var(--error-bg); color: var(--error-ink); }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.self-row td { background: var(--accent-soft); }
.bar-col { width: 30%; }
td.bar-col .bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 2px; padding: 0; border: 0; }

fieldset.q { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 16px; margin: 0 0 12px; position: relative; }
fieldset.q legend { font-weight: 700; padding: 0 6px; }
.q-tools { position: absolute; top: -4px; right: 12px; display: flex; gap: 4px; background: var(--surface); padding: 0 4px; }

.candidates { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 14px; margin: 8px 0 16px; }
.cand { padding: 4px 0; }
.cand.self { color: var(--ok-ink); font-weight: 600; font-size: 14px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; }
.stat-line { font-size: 15px; }

/* レポート */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-num { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tile-sub { font-size: 13px; color: var(--ink-2); }

.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.key { display: inline-block; width: 16px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.key.self { background: var(--series-self); height: 3px; }
.key.comp { background: var(--series-comp); }
.chart { margin: 0; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--axis); font-size: 12px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.self { stroke: var(--series-self); stroke-width: 2.5; }
.chart .line.comp { stroke: var(--series-comp); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.self { fill: var(--series-self); }
.chart .dot.comp { fill: var(--series-comp); }
.chart .end-label { fill: var(--ink-2); font-size: 12px; }
.chart .end-label.self { fill: var(--ink); font-weight: 700; }
.chart .leader { stroke: var(--axis); stroke-width: 1; fill: none; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.tooltip { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); pointer-events: none; min-width: 180px; }
.tip-head { color: var(--muted); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 4px; }
.tip-row span { flex: 1; }

@media print {
  body { background: #fff; }
  .side, .clinic-head, .tabs, .seg, .toast-msg, .no-print { display: none !important; }
  body.with-side { display: block; }
  .page { padding: 0; max-width: none; }
  .card, .tile { break-inside: avoid; border-color: #ccc; }
}

/* QRカード（名刺 91×55mm を A4 に 2列×5段） */
.sheet-wrap { overflow-x: auto; padding: 8px 0 24px; }
.sheet {
  width: 210mm; height: 297mm; margin: 0 auto; background: #fff; color: #111;
  padding: 11mm 14mm; display: grid; grid-template-columns: repeat(2, 91mm); grid-template-rows: repeat(5, 55mm);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.biz {
  width: 91mm; height: 55mm; padding: 5mm 5mm 5mm 6mm; display: flex; gap: 4mm; align-items: stretch;
  outline: 0.2mm dashed #bbb; outline-offset: -0.1mm;  /* 切り取り線 */
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
}
.biz p { margin: 0; }
.biz-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.biz-heading { font-size: 8pt; color: #1f6f6b; font-weight: 700; letter-spacing: .02em; }
.biz-lead { font-size: 10.5pt; font-weight: 700; line-height: 1.45; margin-top: 2mm !important; }
.biz-sub { font-size: 7.5pt; margin-top: 1.5mm !important; color: #333; }
.biz-footer { font-size: 6.5pt; color: #555; margin-top: auto !important; white-space: pre-line; line-height: 1.5; }
.biz-side { width: 27mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5mm; }
.biz-qr { width: 27mm; height: 27mm; }
.biz-qr svg { width: 100%; height: 100%; display: block; }
.biz-name { font-size: 7pt; font-weight: 700; text-align: center; line-height: 1.3; }

@media print {
  @page { size: A4; margin: 0; }
  .sheet-wrap { padding: 0; overflow: visible; }
  .sheet { box-shadow: none; margin: 0; }
  .page:has(.sheet-wrap) > :not(.sheet-wrap) { display: none !important; }  /* QRカードのときだけシート以外を隠す */
}

/* 自社サイトの口コミ（確認） */
.review { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.review.pending { border-color: #e5b454; }
.review.hidden { opacity: .7; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stars-static i { font-style: normal; color: var(--line); }
.stars-static i.on { color: #e0a21b; }
.review-body { white-space: pre-wrap; margin: 8px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.review-actions form { margin: 0; }
.reply-form { display: grid; gap: 6px; }
.reply-form .btn { justify-self: start; }

/* サイトへの設置 */
.code { position: relative; margin: 6px 0 12px; }
.code pre, .code textarea {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  background: #16222a; color: #e6eef2; border: 0; border-radius: 10px; padding: 14px 90px 14px 16px;
  white-space: pre-wrap; word-break: break-all; width: 100%;
}
.code .btn { position: absolute; top: 8px; right: 8px; }
input.color { width: 64px; height: 40px; padding: 2px; }
.embed-preview { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 4px 20px; color: #1f2933; }
td.links a { display: block; white-space: nowrap; }


/* ================================================================ 骨組み（左メニュー・医院・教室のタブ） */
body.with-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px;
}
.side .brand { display: block; font-weight: 700; color: var(--ink); text-decoration: none; padding: 4px 10px 16px; line-height: 1.4; }
.side .brand span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px;
}
.side-nav a:hover { background: var(--bg); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.side-nav a.off span { color: var(--muted); }
.side-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-label { margin: 16px 10px 4px; font-size: 12px; color: var(--muted); }
.side-add { color: var(--accent) !important; margin-top: 4px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 99px; background: #d9822b; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
body.with-side .page { max-width: 1100px; margin: 0; padding: 24px 32px 64px; width: 100%; }
@media (max-width: 860px) {
  body.with-side { display: block; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .side-label { grid-column: 1 / -1; }
  .side-foot { padding-top: 8px; }
  body.with-side .page { padding: 20px 16px 48px; }
}

.clinic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.clinic-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }
.tabs { display: flex; gap: 0; margin: 18px 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; flex-wrap: nowrap; }
.tabs a {
  flex: none; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

.seg { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 0 0 16px; }
.seg a { padding: 6px 14px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.seg a.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg a b { font-weight: 700; color: var(--muted); margin-left: 2px; }

.toast-msg {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: var(--ok-bg); color: var(--ok-ink); border: 1px solid color-mix(in srgb, var(--ok-ink) 25%, transparent);
  padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
  animation: toast-out 4s forwards;
}
@keyframes toast-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast-msg { animation-duration: 6s; } }

/* 概要 */
.pending-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  background: #fff4e5; border: 1px solid #f0c48a; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px;
}
.overview { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.overview .card { margin: 0; }
@media (max-width: 960px) { .overview { grid-template-columns: 1fr; } }
.setup { list-style: none; margin: 8px 0 0; padding: 0; }
.setup li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-mark {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.setup li.done .setup-mark { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.setup li.todo .setup-mark { background: #fff4e5; color: #9a5b12; border-color: #f0c48a; }
.setup li.done strong { color: var(--muted); font-weight: 600; }
.setup-text { flex: 1; min-width: 0; display: grid; }
.setup-note { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.kpis div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.kpis dt { font-size: 12px; color: var(--muted); }
.kpis dd { margin: 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpis dd small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.mini-review { border-top: 1px solid var(--line); padding: 10px 0; }
.mini-review p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }

.notice { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.tag.warn { background: #fff4e5; color: #9a5b12; border-color: #f0c48a; }
.reply-box summary { cursor: pointer; font-size: 14px; color: var(--accent); margin: 4px 0; }
.side { overflow-x: hidden; }
.side-nav, .side-nav a { min-width: 0; }
[hidden] { display: none !important; }
@media print {
  body.with-side .page { padding: 0 !important; margin: 0 !important; max-width: none !important; }
}
.rules { font-size: 13px; color: var(--ink-2); background: #fff8ec; border-left: 3px solid #e5b454; border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 0 0 14px; }

/* ホーム：医院・教室カード */
.filters { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.filters input { max-width: 280px; }
.filters select { width: auto; }
.clinic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.clinic-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.clinic-card header p { margin: 0; }
.clinic-card-name { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; line-height: 1.4; display: block; }
.clinic-card-name:hover { color: var(--accent); }
.clinic-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px !important; }
.todo { list-style: none; margin: 0; padding: 8px 12px; background: #fff4e5; border: 1px solid #f0c48a; border-radius: 10px; display: grid; gap: 2px; }
.todo a { color: #8a4f0d; font-size: 14px; font-weight: 600; }
.todo-done { margin: 0; font-size: 13px; color: var(--ok-ink); background: var(--ok-bg); border-radius: 10px; padding: 8px 12px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.mini-kpis div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.mini-kpis dt { font-size: 11px; color: var(--muted); }
.mini-kpis dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-kpis dd small { font-size: 12px; font-weight: 600; }
.clinic-card footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.empty-start { grid-column: 1 / -1; text-align: center; padding: 40px 20px; }

/* 質問の編集 */
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.q-layout > .card { margin: 0; }
@media (max-width: 1180px) { .q-layout { grid-template-columns: 1fr; } .phone-col { display: none; } }
.qlist { display: grid; gap: 8px; margin: 12px 0; }
.qitem { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.qitem[open] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.qitem > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.qitem > summary::-webkit-details-marker { display: none; }
.qitem > summary::after { content: "▾"; color: var(--muted); margin-left: auto; }
.qitem[open] > summary::after { content: "▴"; }
.qitem-handle { color: var(--muted); cursor: grab; letter-spacing: -2px; user-select: none; }
.qitem-no { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.qitem-label { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qitem-meta { flex: none; font-size: 12px; color: var(--muted); }
.qitem-body { padding: 4px 14px 16px; border-top: 1px solid var(--line); position: relative; }
.qitem-body .q-tools { position: static; display: flex; gap: 6px; justify-content: flex-end; padding: 10px 0; background: none; }
.qitem.dragging { opacity: .5; }
.qitem.drop-target { border-color: var(--accent); border-style: dashed; }
.save-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); }
.phone-col { position: sticky; top: 16px; }
.phone-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.phone { width: 360px; height: 680px; border: 10px solid #1d2426; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.mini-kpis dt { white-space: nowrap; }
.kpi-sub { display: block; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.mini-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset.ui-texts { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 14px; margin: 4px 0 0; }
fieldset.ui-texts legend { font-weight: 700; padding: 0 6px; }

/* キーワードと話題 */
.kw-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.kw-add input { flex: 1; min-width: 260px; }
.kw-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.kw-title { margin: 0; color: var(--ink); font-size: 17px; }
.kw-head p { margin: 2px 0 0; }
.kw-status { text-align: right; }
.kw-cov { margin: 6px 0 0 !important; }
.kw-links { margin: 4px 0 8px; padding-left: 1.2em; font-size: 14px; }
.kw-suggest { background: #fff8ec; border: 1px solid #f0d3a2; border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.kw-suggest p { margin: 4px 0; }
.chip-view { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 1px 10px; margin: 2px 4px 2px 0; font-size: 13px; }
.kw-edit summary { cursor: pointer; font-size: 14px; color: var(--accent); margin: 8px 0 4px; }
.kw-choices { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0 10px; }
.kw-delete { margin-top: 6px; text-align: right; }
.danger-link { color: var(--error-ink) !important; font-size: 13px; }
.kw-head { align-items: center; }
.kw-q { font-weight: 700; margin: 8px 0 4px; }
.kw-new { background: #fff8ec; border: 1px solid #f0d3a2; border-radius: 10px; padding: 12px 14px; margin: 10px 0 4px; display: grid; gap: 10px; }
.kw-new p { margin: 0; }
.alert.warn-note { background: #fff4e5; color: #8a4f0d; }

/* スタッフ */
.side-staff { display: block; padding: 8px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.side-staff.on { color: var(--accent); font-weight: 700; }
.side-me { margin: 8px 0 4px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.side-me span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .link { padding: 0; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { font-family: ui-monospace, monospace; font-size: 13px; }
tr.off td { color: var(--muted); }
.staff-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.staff-actions form { margin: 0; }
