/* ============================================================
   DAYLIGHT COMMAND CENTER — 管理画面（3院統合）
   公開サイトと同じブランドトークンを実務向け密度で使用
   ============================================================ */
:root {
  --paper: #f7f4f1;
  --panel: #ffffff;
  --ink: #2e2925;
  --ink-soft: #6d6058;
  --ink-faint: #a3968d;
  --line: #e5dad1;
  --accent: #8a6450;
  --accent-ink: #5f4437;
  --series-1: #a8542f; /* chart series (validated) */
  --series-2: #2d6da0;
  --ok: #3e7d4e;
  --warn: #b3593a;
  --urgent: #c03a2b;
  --sans: "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --serif: "Noto Serif CJK JP", serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  background: #2e2925; color: #cfc5bc;
  padding: 22px 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  font-family: var(--serif); color: #fff;
  padding: 0 20px 18px; font-size: 15px; letter-spacing: 0.08em;
  border-bottom: 1px solid #453e38; margin-bottom: 14px;
}
.sidebar .brand small { display: block; font-size: 9px; letter-spacing: 0.3em; color: #8d8178; font-family: var(--sans); margin-top: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; font-size: 13px; color: #cfc5bc;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar nav a.active { color: #fff; border-left-color: var(--series-1); background: rgba(255,255,255,.06); }
.sidebar .foot { position: absolute; bottom: 18px; left: 20px; right: 20px; font-size: 10px; color: #8d8178; line-height: 1.6; }

/* ---------------- Main ---------------- */
.main { padding: 26px 30px 60px; max-width: 1240px; }
.page-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title h1 { font-family: var(--serif); font-size: 21px; letter-spacing: 0.04em; }
.page-title .sub { color: var(--ink-faint); font-size: 12px; }
.page-title .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---------------- Panels / tiles ---------------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 18px 20px;
}
.panel h2 { font-size: 12px; letter-spacing: 0.14em; color: var(--ink-faint); font-weight: 600; margin-bottom: 14px; }
.row { display: grid; gap: 14px; margin-bottom: 14px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }
.row.c4 { grid-template-columns: repeat(4, 1fr); }
.row.c6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .row.c6 { grid-template-columns: repeat(3, 1fr); } .row.c4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding-bottom: 10px; }
  .sidebar .foot { position: static; margin: 12px 20px 0; }
  .row.c2, .row.c3 { grid-template-columns: 1fr; }
  .copilot { grid-template-columns: 1fr; }
}

.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.tile .label { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; }
.tile .value { font-family: var(--serif); font-size: 30px; line-height: 1.25; margin-top: 2px; }
.tile .delta { font-size: 11.5px; margin-top: 2px; color: var(--ink-soft); }
.tile .delta.up { color: var(--ok); }
.tile .delta.down { color: var(--warn); }
.tile.alert { border-left: 3px solid var(--urgent); }
.tile.alert .value { color: var(--urgent); }
.tile.accent { border-left: 3px solid var(--series-1); }

/* ---------------- Bars（内訳） ---------------- */
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.hbar .track { display: block; height: 14px; background: var(--paper); border-radius: 3px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--series-1); border-radius: 0 3px 3px 0; min-width: 2px; }
.hbar .n { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hbar .name { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Table ---------------- */
table.list { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--panel); }
table.list th { text-align: left; font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover { background: #fbf7f3; }

/* ---------------- Status chips ---------------- */
.st { display: inline-block; font-size: 10.5px; padding: 2px 9px; border-radius: 20px; letter-spacing: 0.04em; white-space: nowrap; }
.st.new { background: #fdeeea; color: var(--urgent); }
.st.ai_drafted { background: #eef2f8; color: var(--series-2); }
.st.staff_review { background: #f4ead9; color: #8a6420; }
.st.doctor_check { background: #f7e6e0; color: var(--warn); }
.st.replied { background: #e8f1ea; color: var(--ok); }
.st.closed { background: var(--paper); color: var(--ink-faint); }
.st.urgent { background: var(--urgent); color: #fff; }

/* ---------------- Buttons / forms ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 8px 16px; font-size: 12.5px; border-radius: 4px;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--urgent); border-color: #e8c4bd; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 5px 11px; font-size: 11.5px; }

select, input[type="text"], input[type="number"], textarea {
  font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; background: var(--panel); color: var(--ink);
  width: 100%;
}
textarea { resize: vertical; }
label.fld { display: block; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.08em; margin-bottom: 4px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  border: 1px solid var(--line); background: var(--panel); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; color: var(--ink-soft);
}
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------- Inquiry detail: 3 panes ---------------- */
.copilot { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .copilot { grid-template-columns: 1fr; } }
.msg { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; font-size: 13px; background: #fbf8f5; }
.msg.patient { border-left: 3px solid var(--series-2); }
.msg.staff { border-left: 3px solid var(--ok); background: #f6faf7; }
.msg .who { font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.1em; margin-bottom: 4px; }
.rule-card { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; background: #fffdfb; }
.rule-card .t { font-weight: 600; font-size: 12.5px; }
.rule-card .b { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.rule-card .m { font-size: 10.5px; color: var(--ink-faint); margin-top: 4px; }
.caution { background: #fdf3ec; border: 1px solid #f0d9c8; border-radius: 4px; padding: 8px 12px; font-size: 12px; margin-bottom: 6px; color: #7a4a1f; }
.ai-brief { white-space: pre-wrap; font-size: 12.5px; background: #f2f4f8; border-radius: 4px; padding: 10px 12px; color: #33475e; }
.draft-area textarea { min-height: 260px; line-height: 1.9; }
.banner-note {
  background: #f4ead9; border: 1px solid #e2cfa8; color: #6d5416;
  border-radius: 4px; padding: 9px 14px; font-size: 12px; margin-bottom: 16px;
}

/* ---------------- Factory ---------------- */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb {
  border: 2px solid var(--line); border-radius: 6px; overflow: hidden; position: relative;
  cursor: pointer; background: var(--panel);
}
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumb.sel { border-color: var(--series-1); }
.thumb .tag { position: absolute; top: 6px; left: 6px; font-size: 9.5px; background: rgba(46,41,37,.75); color: #fff; padding: 2px 7px; border-radius: 3px; letter-spacing: 0.08em; }
.thumb .controls { padding: 6px; display: grid; gap: 4px; }
.thumb select { font-size: 11px; padding: 4px 6px; }
.steps { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.steps span { font-size: 11px; padding: 5px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-faint); }
.steps span.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.preview-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preview-ba figure { position: relative; margin: 0; }
.preview-ba img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.preview-ba figcaption { position: absolute; top: 8px; left: 8px; font-size: 9.5px; letter-spacing: 0.18em; background: rgba(46,41,37,.65); color: #fff; padding: 2px 8px; }

.empty { text-align: center; color: var(--ink-faint); padding: 40px 12px; font-size: 13px; }
.muted { color: var(--ink-faint); font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; }
h3.sec { font-size: 12px; letter-spacing: 0.12em; color: var(--ink-faint); margin: 18px 0 8px; font-weight: 600; }

/* ---------------- 進化のあゆみ（/admin#/evolution） ---------------- */
.navhead {
  font-size: 9.5px; letter-spacing: 0.28em; color: #8d8178;
  padding: 12px 20px 4px; text-transform: uppercase;
}
/* カテゴリ色（固定順・常にラベル併記） */
.evo-c0 { --cc: #2d6da0; } /* 患者対応 */
.evo-c1 { --cc: #3e7d4e; } /* 症例・発信 */
.evo-c2 { --cc: #a8542f; } /* バックオフィス */
.evo-c3 { --cc: #8a6450; } /* 経営・基盤 */
.evo-c4 { --cc: #8d8178; } /* 構想 */
.evo-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc); flex: none; }
.evo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; background: var(--panel);
}
.evo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.evo-card { border-left: 3px solid var(--cc); display: flex; flex-direction: column; gap: 10px; }
.evo-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.evo-card h3 { font-size: 14.5px; line-height: 1.5; font-weight: 600; }
.evo-status { font-size: 11px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.evo-lvl { display: flex; align-items: center; gap: 10px; }
.evo-lvl .segs { display: flex; gap: 3px; }
.evo-lvl .segs i { width: 26px; height: 6px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); }
.evo-lvl .segs i.on { background: var(--series-1); border-color: var(--series-1); }
.evo-lvl .t { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.evo-ba { display: grid; gap: 6px; font-size: 12.5px; }
.evo-ba > div { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; color: var(--ink-soft); }
.evo-ba .a { border-color: var(--series-2); color: var(--ink); background: #f7fafc; }
.evo-ba .k { display: block; font-size: 10px; color: var(--ink-faint); font-weight: 600; letter-spacing: 0.08em; margin-bottom: 1px; }
.evo-ba .a .k { color: var(--series-2); }
.evo-eff { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.evo-bens { font-size: 11.5px; color: var(--ink-faint); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.evo-bens .chip { border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; color: var(--ink-soft); }
.evo-next { margin-top: auto; font-size: 12px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 9px; }
.evo-next span { color: var(--ink-faint); font-weight: 600; margin-right: 8px; }
.evo-day h4 { margin: 14px 0 6px; font-size: 12.5px; color: var(--ink-soft); }
.evo-day ul { list-style: none; margin: 0; padding: 0 0 4px; border-left: 2px solid var(--line); }
.evo-day li { display: flex; gap: 12px; padding: 6px 0; margin-left: -6px; align-items: flex-start; }
.evo-day li .evo-dot { margin-top: 6px; outline: 3px solid var(--panel); }
.evo-day .pj { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.evo-day p { margin: 0; font-size: 12.5px; }
.evo-idea { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.evo-idea:last-child { border-bottom: none; }
.evo-idea span:last-child { color: var(--ink-soft); }

/* ---------------- SNSのいま（Instagram公開データ） ---------------- */
/* ヒートマップは単色ランプ(--series-1系 淡→濃)。数値・ラベルはインクトークンのまま */
.sns-cal { display: flex; flex-direction: column; gap: 7px; overflow-x: auto; }
.sns-calrow { display: flex; align-items: center; gap: 12px; }
.sns-callabel { width: 170px; flex: none; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.sns-callabel small { display: block; font-weight: 400; font-size: 10px; color: var(--ink-faint); }
.sns-cells { display: flex; gap: 3px; flex: none; }
.sns-cell { display: block; width: 9px; height: 9px; border-radius: 2.5px; }
.sns-cell.h0 { background: #f1f0ec; }
.sns-cell.h1 { background: #ffc078; }
.sns-cell.h2 { background: #ff8018; }
.sns-cell.h3 { background: #d9480f; }
.sns-calsum { flex: none; font-size: 12.5px; margin-left: 4px; white-space: nowrap; }
.sns-calsum small { color: var(--ink-faint); font-size: 10px; }
.sns-legend { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 10.5px; }
.sns-legend .sns-cell { width: 10px; height: 10px; }

.sns-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sns-table th { text-align: left; font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 600; padding: 4px 10px; border-bottom: 1px solid var(--line); }
.sns-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.sns-table tr:last-child td { border-bottom: none; }
.sns-table .num { text-align: right; }
.sns-up { color: var(--ok); font-weight: 600; }

.sns-rank { list-style: none; margin: 0; padding: 0; counter-reset: snsrank; }
.sns-rank li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); counter-increment: snsrank; align-items: flex-start; }
.sns-rank li:last-child { border-bottom: none; }
.sns-rank li::before { content: counter(snsrank); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.sns-rank li:nth-child(-n+3)::before { background: var(--ink); border-color: var(--ink); color: #fff; }
.sns-rank-metric { flex: none; width: 74px; text-align: right; font-weight: 600; font-size: 14px; line-height: 1.3; }
.sns-rank-metric small { display: block; font-weight: 400; font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.06em; }
.sns-rank-body { min-width: 0; }
.sns-rank-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 11px; }
.sns-rank-head .chip { border: 1px solid var(--line); border-radius: 20px; padding: 0 8px; color: var(--ink-soft); font-size: 10.5px; }
.sns-rank-body p { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sns-rank-body p a { color: var(--series-2); margin-left: 6px; }

/* SNSランキングのサムネイル */
.sns-thumb { flex: 0 0 56px; }
.sns-real { position: relative; display: block; width: 56px; height: 56px; }
.sns-real .play { position: absolute; top: 3px; right: 4px; font-size: 8px; color: #fff; background: rgba(60,50,40,.6); border-radius: 4px; padding: 1px 3px; line-height: 1; }
.sns-real:hover { filter: brightness(1.04); }
.sns-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }

/* ---------- ハリちゃんサプライズ ---------- */
.hari-walk{position:fixed;bottom:6px;left:0;z-index:900;display:flex;flex-direction:column;align-items:center;gap:5px;
  cursor:pointer;animation:hariLR 24s linear forwards;will-change:transform}
.hari-walk.rtl{animation-name:hariRL}
.hari-flip{display:block}
.hari-walk.rtl .hari-flip{transform:scaleX(-1)}
.hari-svg{width:86px;height:74px;display:block;animation:hariBob .55s ease-in-out infinite;
  filter:drop-shadow(0 4px 6px rgba(90,70,50,.28))}
.hari-bub{max-width:250px;background:#fffdf9;border:1.5px solid #e8d6bd;border-radius:14px;border-bottom-left-radius:3px;
  padding:9px 13px;font-size:12.5px;color:#5d5142;line-height:1.6;box-shadow:0 8px 22px rgba(140,110,80,.2);
  animation:hariBub 24s linear forwards}
@keyframes hariLR{0%{transform:translateX(-190px)}40%{transform:translateX(calc(50vw - 60px))}
  60%{transform:translateX(calc(50vw - 60px))}100%{transform:translateX(calc(100vw + 50px))}}
@keyframes hariRL{0%{transform:translateX(calc(100vw + 50px))}40%{transform:translateX(calc(50vw - 60px))}
  60%{transform:translateX(calc(50vw - 60px))}100%{transform:translateX(-190px)}}
@keyframes hariBob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@keyframes hariBub{0%,26%{opacity:0;transform:translateY(8px) scale(.92)}
  33%,67%{opacity:1;transform:translateY(0) scale(1)}74%,100%{opacity:0;transform:translateY(-5px) scale(.95)}}

/* ---------- SNS: 絵コンテ風サムネイル ---------- */
.sns-story{width:56px;height:56px;border-radius:9px;display:flex;flex-direction:column;align-items:center;
  justify-content:center;position:relative;text-decoration:none;border:1px solid rgba(120,95,70,.14);
  box-shadow:0 2px 6px rgba(140,110,80,.12)}
.sns-story .emo{font-size:22px;line-height:1}
.sns-story small{font-size:9px;color:#6b5c4a;margin-top:2px;font-weight:700;letter-spacing:.05em}
.sns-story .play{position:absolute;top:3px;right:4px;font-size:8px;color:#fff;background:rgba(60,50,40,.55);
  border-radius:99px;padding:1px 4px;line-height:1.3}
.sns-story:hover{filter:brightness(1.05)}
.sb-eye{background:linear-gradient(135deg,#e8d9f7,#cdb6ee)}
.sb-kuma{background:linear-gradient(135deg,#dcd9f0,#b9b3e0)}
.sb-nose{background:linear-gradient(135deg,#fde3d1,#f7c8a8)}
.sb-lip{background:linear-gradient(135deg,#fcd7e2,#f5aec4)}
.sb-inj{background:linear-gradient(135deg,#d7ecf5,#aed7ec)}
.sb-qa{background:linear-gradient(135deg,#fdf2cd,#f2dfa0)}
.sb-case{background:linear-gradient(135deg,#d9f0dc,#b3ddba)}
.sb-etc{background:linear-gradient(135deg,#eee7dc,#ddceba)}

/* ---------- SNS: フォロワー表コンパクト2列 ---------- */
.sns-fol2{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;align-items:start}
.sns-table-sm td,.sns-table-sm th{padding:3px 8px !important;font-size:11.5px !important;line-height:1.5}
.sns-table-sm .muted{font-size:10px}
@media (max-width:980px){.sns-fol2{grid-template-columns:1fr}}

/* ---------- 問い合わせ: 最近のAI返信例 ---------- */
.ai-ex{margin-bottom:12px}
.ai-ex-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.ai-ex-card{border:1px solid #eee3d2;border-radius:10px;padding:10px 13px;background:#fffdf9;cursor:pointer;
  transition:box-shadow .15s}
.ai-ex-card:hover{box-shadow:0 4px 14px rgba(160,120,80,.14)}
.ai-ex-card .q{font-size:12px;font-weight:700;color:#4a4036;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden}
.ai-ex-card .a{font-size:12px;color:#5d5142;margin-top:6px;line-height:1.7;display:-webkit-box;
  -webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;border-left:3px solid #e7c569;padding-left:8px}
.ai-ex-card .m{font-size:10.5px;color:#a89a88;margin-top:7px}

/* ---------- SNS: 日付軸 ---------- */
.sns-axis { margin-bottom: 2px; }
.sns-axis .ax { display: block; width: 9px; height: 13px; position: relative; }
.sns-axis .ax em { position: absolute; left: -2px; bottom: 0; font-style: normal; font-size: 9px;
  color: var(--ink-faint); white-space: nowrap; border-left: 1px solid #d8cdbc; padding-left: 3px; line-height: 1.2; }

/* ---------- SNS: トレンドボックス ---------- */
.sns-trends { border: 1.5px solid #d9c08c; background: linear-gradient(135deg, #fffdf9, #fdf6e9); }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 9px; }
.tr-card { background: #fff; border: 1px solid #eee3d2; border-radius: 10px; padding: 9px 12px; }
.tr-card .t { font-size: 12.5px; font-weight: 700; color: #4a4036; margin-bottom: 3px; }
.tr-card p { font-size: 11.5px; color: #6b5c4a; line-height: 1.7; }

/* ---------- SNS: ドクター名クリック + アドバイスモーダル ---------- */
.sns-click { cursor: pointer; }
.sns-click:hover { color: #b45a2b; }
.sns-hint { font-style: normal; font-size: 10px; opacity: .65; }
.sns-adv-ov { position: fixed; inset: 0; z-index: 950; background: rgba(60, 50, 40, .35);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.sns-adv { background: #fffdf9; border: 1px solid #e2d4bf; border-radius: 16px; padding: 22px 26px;
  max-width: 520px; width: 100%; max-height: 80vh; overflow: auto; box-shadow: 0 18px 50px rgba(60, 45, 30, .3); }
.sns-adv h3 { font-family: "Hiragino Mincho ProN", serif; font-size: 16px; color: #4a4036; margin-bottom: 10px; }
.sns-adv h3 small { font-size: 11px; color: #a89a88; font-weight: 400; }
.sns-adv .adv-stats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.sns-adv .adv-stats span { background: #faf3e8; border: 1px solid #eee3d2; border-radius: 999px;
  padding: 3px 11px; font-size: 11px; color: #8a7a66; }
.sns-adv .adv-stats b { color: #4a4036; }
.sns-adv ul { margin: 0 0 10px 18px; }
.sns-adv li { font-size: 12.5px; color: #5d5142; line-height: 1.8; margin-bottom: 5px; }
.sns-adv .adv-close { border: 1px solid #e2d4bf; background: #fff; border-radius: 999px;
  padding: 6px 18px; font-size: 12px; cursor: pointer; color: #6b5c4a; }

/* ---------- Command Center: 覚えた回答例 + 6ジャンル ---------- */
.ls-extra { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-top: 10px; }
@media (max-width: 980px) { .ls-extra { grid-template-columns: 1fr; } }
.ls-ex, .ls-gen { background: rgba(255, 255, 255, .7); border: 1px solid #eee3d2; border-radius: 10px; padding: 9px 13px; }
.ls-h { font-size: 11px; font-weight: 700; color: #a08a72; letter-spacing: .08em; margin-bottom: 6px; }
.ls-q { font-size: 12px; color: #5d5142; line-height: 1.7; border-left: 3px solid #e7c569;
  padding-left: 9px; margin-bottom: 6px; }
.ls-gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.ls-g { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #6b5c4a; }
.ls-g .segs { display: inline-flex; gap: 2px; flex: none; }
.ls-g .segs i { width: 11px; height: 6px; border-radius: 3px; background: #ece2d2; display: block; }
.ls-g .segs i.on { background: linear-gradient(90deg, #e8bd8f, #c98d5f); }
.ls-g .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 目安箱 ---------- */
.sugg { border: 1.5px solid #d9c08c; background: linear-gradient(150deg, #fffdf9, #fdf6e9); }
.sugg-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sugg-hari { width: 64px; height: 54px; flex: none; animation: opebob 3.2s ease-in-out infinite; }
@keyframes opebob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.sugg-bub { background: #fff; border: 1.5px solid #e8d6bd; border-radius: 13px; border-top-left-radius: 3px;
  padding: 10px 14px; font-size: 12.5px; color: #5d5142; line-height: 1.8; }
.sugg-bub small { display: block; font-size: 10.5px; color: #a89a88; margin-top: 3px; }
.sugg-form { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.sugg-form input { border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; width: 110px; font-size: 13px; }
.sugg-form textarea { border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; flex: 1;
  min-width: 240px; font-size: 13px; font-family: inherit; resize: vertical; }
.sugg-form button { border: none; background: linear-gradient(135deg, #b45a2b, #d07a45); color: #fff;
  border-radius: 8px; padding: 8px 20px; font-size: 13px; cursor: pointer; }
.sugg-msg { font-size: 12px; color: #7a6335; margin-top: 8px; }
.sugg-admin { margin-top: 14px; border-top: 1px dashed #e0d2ba; padding-top: 10px; }
.sugg-admin h3 { font-size: 12px; color: #a08a72; margin-bottom: 7px; }
.sugg-pts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sugg-item { background: #fff; border: 1px solid #eee3d2; border-radius: 9px; padding: 8px 12px; margin-bottom: 6px; }
.sugg-item.adopted { border-color: #d9b845; background: #fffcf2; }
.sugg-item.declined { opacity: .55; }
.sugg-item .b { font-size: 12.5px; color: #4a4036; line-height: 1.7; }
.sugg-item .m { display: flex; gap: 10px; align-items: center; font-size: 11px; color: #a89a88; margin-top: 5px; flex-wrap: wrap; }
.sugg-item .m select { border: 1px solid #ddd; border-radius: 6px; padding: 2px 6px; font-size: 11px; }
.sugg-item .m label { display: flex; gap: 3px; align-items: center; }
.sugg-item .m input { border: 1px solid #ddd; border-radius: 6px; padding: 2px 6px; width: 50px; font-size: 11px; text-align: center; }

/* ---------- ハリちゃんに聞く(社内AIチャット) ---------- */
.ask-panel { max-width: 860px; }
.ask-log { max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.ask-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-end; }
.ask-row.user { justify-content: flex-end; }
.ask-face { width: 46px; height: 38px; flex: none; }
.ask-bub { max-width: 72%; border-radius: 14px; padding: 9px 14px; font-size: 13px; line-height: 1.8; }
.ask-bub p { margin: 0; }
.ask-bub p + p { margin-top: 4px; }
.ask-row.assistant .ask-bub { background: #fff; border: 1.5px solid #e8d6bd; border-bottom-left-radius: 3px; color: #4a4036; }
.ask-row.user .ask-bub { background: linear-gradient(135deg, #4a4036, #6b5c4a); color: #f8f2e9; border-bottom-right-radius: 3px; }
.ask-typing { color: #a89a88 !important; font-style: italic; }
.ask-quick { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 4px; }
.ask-quick button { border: 1px solid #e2d4bf; background: #fffdf9; border-radius: 999px; padding: 6px 14px;
  font-size: 12px; color: #6b5c4a; cursor: pointer; }
.ask-quick button:hover { background: #f7ecdd; }
.ask-input { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.ask-input textarea { flex: 1; border: 1.5px solid #e2d4bf; border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-family: inherit; resize: none; background: #fff; }
.ask-input button { border: none; background: linear-gradient(135deg, #b45a2b, #d07a45); color: #fff;
  border-radius: 12px; padding: 0 22px; font-size: 13px; cursor: pointer; }
.ask-input button:disabled { opacity: .5; }

/* ---------- SNS: 高反響日のキラキラ✨ ---------- */
.sns-cellwrap { position: relative; display: block; }
.sns-cellwrap.spark::after { content: '✨'; position: absolute; top: -8px; right: -6px; font-size: 10px;
  animation: twinkle 1.5s ease-in-out infinite; pointer-events: none; }
@keyframes twinkle { 0%, 100% { opacity: .45; transform: scale(.85) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(8deg); } }

/* ---------- SNS: 反響のいま(コモちゃん週次レポート) ---------- */
.inqw { border: 1.5px solid #b9c08c; background: linear-gradient(150deg, #fdfef8, #f4f6e8); }
.inqw-top { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.inqw-komo { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 300px; }
.komo-svg { width: 118px; height: 47px; flex: none; }
.inqw-bub { background: #fff; border: 1.5px solid #cdd3a3; border-radius: 12px; border-bottom-left-radius: 3px;
  padding: 9px 13px; font-size: 12.5px; color: #4c5138; line-height: 1.8; }
.inqw-bub b { font-size: 15px; }
.inqw-bars { display: flex; gap: 9px; align-items: flex-end; padding: 0 4px; }
.inqw-bar { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.inqw-bar b { font-size: 11px; color: #5c6339; }
.inqw-bar i { display: block; width: 24px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #aeb87b, #7c8752); transition: height .4s; }
.inqw-bar small { font-size: 8.5px; color: #9aa06b; white-space: nowrap; }
.inqw-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.inqw-chips span { background: #fff; border: 1px solid #dde2bd; border-radius: 999px; padding: 4px 12px;
  font-size: 11px; color: #5c6339; }
.inqw-form { margin-top: 10px; }
.inqw-toggle { border: 1px solid #cdd3a3; background: #fff; border-radius: 999px; padding: 6px 14px;
  font-size: 12px; color: #5c6339; cursor: pointer; }
.inqw-toggle:hover { background: #f4f6e8; }
.inqw-form textarea { width: 100%; margin-top: 8px; border: 1px solid #ddd; border-radius: 10px;
  padding: 10px 12px; font-size: 12px; font-family: inherit; }
.inqw-save { margin-top: 6px; border: none; background: linear-gradient(135deg, #7c8752, #9aa06b); color: #fff;
  border-radius: 8px; padding: 7px 18px; font-size: 12.5px; cursor: pointer; }

/* ---------- 徘徊レア回: コモちゃん ---------- */
.hari-walk.komo { animation-duration: 36s; }
.hari-walk.komo .hari-bub { border-color: #cdd3a3; color: #4c5138; animation-duration: 36s;
  border-bottom-left-radius: 3px; }
.komo-walk-svg { width: 150px; height: 60px; display: block; animation: komoSway 1.1s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(70, 80, 50, .28)); }
@keyframes komoSway { 0%, 100% { transform: translateY(0) rotate(-.6deg); }
  50% { transform: translateY(-2px) rotate(.6deg); } }

/* ---------- 反響のいま: カレンダーと同一時間軸の週バー ---------- */
.inqw-lanewrap { align-items: flex-end; }
.inqw-lane { position: relative; display: block; height: 62px; flex: none; }
.inqw-bar2 { position: absolute; bottom: 0; display: block; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #aeb87b, #7c8752); box-shadow: 0 2px 5px rgba(90, 100, 60, .2); }
.inqw-bar2 b { position: absolute; top: -15px; left: 0; right: 0; text-align: center;
  font-size: 10.5px; color: #5c6339; }
.inqw-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.inqw-meta .inqw-bub { flex: 1 1 220px; min-width: 0; }

/* ---------- 縦方向のコンパクト化(投稿カレンダー〜反響のいま) ---------- */
.sns-cal .sns-calrow { margin-bottom: 2px; }
.sns-callabel { font-size: 11.5px; line-height: 1.25; }
.sns-callabel small { font-size: 9px; }
.sns-axis .ax { height: 11px; }
.sns-legend { margin-top: 5px; font-size: 10.5px; }
.inqw { padding: 12px 16px 10px; margin-top: 8px; }
.inqw h2 { margin-bottom: 8px; }
.komo-svg { width: 96px; height: 39px; }
.inqw-bub { font-size: 12px; padding: 7px 11px; line-height: 1.65; }
.inqw-bub b { font-size: 14px; }
.inqw-chips { margin-top: 6px; }
.inqw-chips span { padding: 3px 10px; font-size: 10.5px; }

/* ---------- キラキラ強化(高反響日をはっきり) ---------- */
.sns-cellwrap.spark .sns-cell { box-shadow: 0 0 0 2px #ffd24a, 0 0 12px 3px rgba(255, 190, 40, .8);
  animation: sparkGlow 1.4s ease-in-out infinite; }
.sns-cellwrap.spark::after { content: '✨'; font-size: 15px; top: -11px; right: -8px;
  text-shadow: 0 0 8px rgba(255, 210, 74, .95); animation: twinkle 1.1s ease-in-out infinite; }
@keyframes sparkGlow { 0%, 100% { box-shadow: 0 0 0 2px #ffd24a, 0 0 8px 2px rgba(255, 190, 40, .55); }
  50% { box-shadow: 0 0 0 2.5px #ffdf7a, 0 0 16px 5px rgba(255, 190, 40, .95); } }

/* ---------- リールを含む日(紫枠) ---------- */
.sns-cellwrap.reel .sns-cell { outline: 1.5px solid #8f7bd9; outline-offset: 1px; }
.lg-reel { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #ffc078;
  outline: 1.5px solid #8f7bd9; outline-offset: 1px; margin: 0 3px; }

/* ---------- 反響のいま: 週次内訳の数字行 ---------- */
.inqw-sec { font-size: 10px; font-weight: 700; color: #9aa06b; letter-spacing: .1em; margin: 7px 0 2px; }
.inqw-numrow { margin-bottom: 1px; align-items: center; }
.sns-callabel.nr { font-size: 11px; color: #5c6339; }
.inqw-lane.num { height: 16px; }
.inqw-lane.num em { position: absolute; top: 0; width: 32px; text-align: center; font-style: normal;
  font-size: 10.5px; line-height: 1.45; color: #4c5138; background: rgba(255, 255, 255, .65);
  border-radius: 4px; }
.inqw-lane.num em.z { color: #c2c7a4; background: transparent; }

/* ---------- コモちゃん名前タグ / Command Center配置 ---------- */
.komo-tag { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: none; }
.komo-tag small { font-size: 9px; color: #7c8752; font-weight: 700; letter-spacing: .04em; }
.cc-komo { display: flex; gap: 8px; align-items: center; margin-top: 9px; font-size: 11px; color: #8a7a66; }
.cc-komo b { color: #5c6339; }

/* ---------- 反響のいま: ↗↘矢印と歴代バッジ ---------- */
.inqw-lane.num em { width: 38px; }
.inqw-lane.num em sup, .inqw-bar2 b sup { font-size: 8.5px; font-weight: 700; margin-left: 1px; vertical-align: super; }
.inqw-lane.num em sup.up, .inqw-bar2 b sup.up { color: #d64541; }
.inqw-lane.num em sup.dn, .inqw-bar2 b sup.dn { color: #3a7bd5; }
.inqw-lane.num em .bd, .inqw-bar2 b .bd { font-size: 10px; margin-left: 1px; }

/* ---------- 🎮 勇者の間(院長専用) ---------- */
.game-wrap { height: calc(100vh - 48px); }
.game-frame { width: 100%; height: 100%; border: 1.5px solid #eadfce; border-radius: 14px;
  background: #000; box-shadow: 0 8px 26px rgba(60, 45, 30, .18); }

/* ---------- 勇者の間: 読み込み中表示 ---------- */
.game-wrap { position: relative; }
.game-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; font-size: 16px; color: #6b5c4a;
  background: linear-gradient(160deg, #f9f5ef, #f4ece2); border: 1.5px solid #eadfce;
  border-radius: 14px; animation: gamePulse 1.6s ease-in-out infinite; }
.game-loading small { font-size: 11px; color: #a89a88; }
@keyframes gamePulse { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }

/* ---------- 勇者の間: ダーク読み込み画面 / マップ / サイドバー小リンク ---------- */
.game-loading { background: linear-gradient(160deg, #16142a, #211d3d); border-color: #38325e;
  color: #cfc8ee; }
.game-loading small { color: #7d76a8; }
.map-frame { background: #f9f5ef; }
.sidebar nav a.nav-tiny { font-size: 10.5px; opacity: .5; }

/* ---------- のべ来訪カウンター & キリ番エフェクト ---------- */
.visits { margin: 8px 18px 2px; font-size: 10.5px; color: #a89a88; letter-spacing: .05em;
  border: 1px solid rgba(201, 162, 39, .35); border-radius: 999px; padding: 4px 12px; text-align: center; }
.visits b { color: #e7c569; font-size: 12.5px; font-family: "Hiragino Mincho ProN", serif; }
.kiriban { position: fixed; inset: 0; z-index: 990; background: rgba(40, 32, 22, .55);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  animation: kbFade .4s ease-out; }
.kb-card { position: relative; background: linear-gradient(150deg, #fffdf6, #fdf3da);
  border: 2.5px solid #e7c569; border-radius: 22px; padding: 42px 64px; text-align: center;
  box-shadow: 0 0 60px 12px rgba(231, 197, 105, .55), 0 24px 60px rgba(60, 45, 20, .4);
  animation: kbPop .5s cubic-bezier(.2, 1.6, .4, 1); }
.kb-num { font-family: "Hiragino Mincho ProN", serif; font-size: 64px; color: #b8860b;
  text-shadow: 0 2px 14px rgba(231, 197, 105, .8); line-height: 1.1; }
.kb-card p { font-size: 15px; color: #6b5c4a; margin-top: 10px; }
.kb-card small { display: block; margin-top: 12px; font-size: 10.5px; color: #b3a894; }
.kb-s { position: absolute; font-size: 30px; animation: kbTwinkle 1.2s ease-in-out infinite; }
.kb-s.s1 { top: -16px; left: -12px; }
.kb-s.s2 { top: -18px; right: -10px; animation-delay: .3s; font-size: 36px; }
.kb-s.s3 { bottom: -14px; right: 24px; animation-delay: .6s; }
.kb-s.s4 { bottom: -18px; left: 20px; animation-delay: .9s; font-size: 34px; }
@keyframes kbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kbPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes kbTwinkle { 0%, 100% { transform: scale(.8) rotate(-10deg); opacity: .6; }
  50% { transform: scale(1.25) rotate(10deg); opacity: 1; } }

/* ===== 📷 症例写真自動生成 ===== */
.cp-note { background: #f4f9f4; border: 1px solid #cfe5cf; color: #2e7d32; border-radius: 10px; padding: 9px 14px; font-size: 12.5px; margin-bottom: 16px; }
.cp-zones { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-bottom: 14px; }
.cp-zone { flex: 1 1 240px; min-height: 210px; border: 2px dashed #d8c9ae; border-radius: 14px; background: #fffdf9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 14px; text-align: center; transition: border-color .15s, background .15s; }
.cp-zone:hover { border-color: var(--accent); background: #fdf8ec; }
.cp-zone.filled { border-style: solid; border-color: var(--accent); }
.cp-zbig { font-size: 34px; }
.cp-zname { font-weight: 700; font-size: 13px; color: var(--ink); word-break: break-all; }
.cp-zsub { font-size: 11px; color: var(--ink-faint); }
.cp-thumb { max-width: 100%; max-height: 150px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.cp-swap { flex: none; align-self: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #d8c9ae; background: #fffdf9; font-size: 17px; cursor: pointer; color: var(--ink); }
.cp-swap:hover { border-color: var(--accent); color: var(--accent); }
.cp-swap:disabled { opacity: .4; cursor: not-allowed; }
.cp-controls { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cp-gain { font-size: 12.5px; color: var(--ink); }
.cp-gain select { margin-left: 4px; padding: 5px 8px; border-radius: 8px; border: 1px solid #d8c9ae; background: #fffdf9; font-size: 12.5px; }
.cp-run { padding: 10px 22px; font-size: 13.5px; }
.cp-err { background: #fdf0ee; border: 1px solid #e8c4bd; color: #b3372a; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 12px; white-space: pre-wrap; }
.cp-busy { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-faint); margin: 14px 0; }
.cp-spin { width: 17px; height: 17px; border: 2.5px solid #e6d9c0; border-top-color: var(--accent); border-radius: 50%; animation: cpspin 0.9s linear infinite; }
@keyframes cpspin { to { transform: rotate(360deg); } }
.cp-result { margin-top: 18px; background: #fffdf9; border: 1.5px solid #eadfce; border-radius: 14px; padding: 16px 18px; }
.cp-result h2 { font-size: 14.5px; margin-bottom: 10px; }
.cp-prev { max-width: 100%; max-height: 560px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); display: block; }
.cp-dl { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cp-dlsub { font-size: 11.5px; color: var(--ink-faint); }

/* 症例写真: まとめ投入UI */
.cp-zone-wide { flex: 1 1 100%; min-height: 150px; width: 100%; margin-bottom: 14px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cp-cell { position: relative; background: #fffdf9; border: 1.5px solid #eadfce; border-radius: 10px; padding: 6px; text-align: center; }
.cp-cell img { width: 100%; height: 110px; object-fit: cover; border-radius: 7px; }
.cp-cellname { font-size: 10px; color: var(--ink-faint); margin-top: 4px; word-break: break-all; line-height: 1.4; }
.cp-x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: none; background: #4a4036; color: #fff; font-size: 11px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.cp-x:hover { background: #c0392b; }
.cp-results { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.cp-sim { margin-left: 10px; font-size: 11px; font-weight: 400; color: #2e7d32; background: #e3f2e3; border-radius: 999px; padding: 2px 10px; vertical-align: 2px; }
.cp-pairinfo { font-size: 12.5px; color: var(--ink); margin-bottom: 10px; line-height: 1.9; }
.cp-basis { display: inline-block; margin-left: 10px; font-size: 11px; color: #9a6b00; background: #fff3d6; border-radius: 999px; padding: 2px 10px; }

/* ===== 🏡 ハリちゃんの家(成長ゲーム) ===== */
.ask-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
@media (max-width: 1180px) { .ask-cols { grid-template-columns: 1fr; } }
.hh-panel h2 { margin-bottom: 10px; }
.hh-scene { width: 100%; height: auto; border-radius: 12px; border: 1.5px solid #eadfce; display: block; }
.hh-lv { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--ink); margin: 10px 0 6px; }
.hh-nextlabel { font-size: 10.5px; font-weight: 400; color: var(--ink-faint); }
.hh-bar { height: 9px; border-radius: 999px; background: #efe6d4; overflow: hidden; }
.hh-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c9a227, #7c8752); transition: width .6s; }
.hh-grow { font-size: 11.5px; color: var(--ink-soft, #6b5c4a); line-height: 1.8; margin: 10px 0; }
.hh-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hh-stats span { font-size: 10.5px; background: #faf3e8; border: 1px solid #eee3d2; border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.hh-box { border-top: 1.5px dashed #eadfce; padding-top: 12px; }
.hh-box h3 { font-size: 13px; margin-bottom: 6px; }
.hh-boxsub { font-size: 10.5px; color: var(--ink-faint); line-height: 1.7; margin-bottom: 8px; }
.hh-box input[type="text"], .hh-box input:not([type]) { width: 100%; padding: 8px 10px; border: 1px solid #e2d4bf; border-radius: 8px; font-size: 12px; margin-bottom: 6px; background: #fff; }
.hh-box textarea { width: 100%; padding: 8px 10px; border: 1px solid #e2d4bf; border-radius: 8px; font-size: 12px; resize: vertical; background: #fff; }
.hh-boxrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.hh-file { font-size: 11px; color: var(--ink); border: 1px dashed #c9b28c; border-radius: 8px; padding: 6px 10px; cursor: pointer; background: #fffdf9; }
.hh-file:hover { border-color: var(--accent); color: var(--accent); }
.hh-msg { font-size: 11.5px; color: #2e7d32; margin-top: 8px; line-height: 1.7; }
.hh-approve { border-top: 1.5px dashed #eadfce; margin-top: 12px; padding-top: 12px; }
.hh-approve h3 { font-size: 13px; margin-bottom: 4px; }
.hh-appitem { background: #fffdf9; border: 1px solid #eadfce; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.hh-appitem .b { font-size: 11px; font-weight: 700; color: var(--ink); }
.hh-appitem .t { font-size: 11px; color: var(--ink-soft, #6b5c4a); line-height: 1.6; margin: 4px 0 7px; }
.hh-appitem button { margin-right: 6px; }

/* ハリちゃんの家: 25レベル・添付・重み付き承認 */
.hh-lvmax { font-size: 10px; color: var(--ink-faint); font-weight: 400; margin-right: 2px; }
.hh-att { font-size: 11px; color: var(--ink); margin-top: 6px; }
.hh-attx { border: none; background: #4a4036; color: #fff; border-radius: 50%; width: 17px; height: 17px; font-size: 9px; cursor: pointer; margin-left: 4px; }
.hh-sum { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 400; color: #9a6b00; background: #fff3d6; border-radius: 999px; padding: 1px 8px; }
.hh-extract { background: #faf6ec; border-radius: 8px; padding: 6px 8px; }
.hh-appitem a { color: #b45a2b; }
.hh-approw { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.hh-approw select { padding: 4px 6px; border-radius: 7px; border: 1px solid #e2d4bf; background: #fff; font-size: 11px; }

/* ===== 🏆 記録更新のお祝いエフェクト ===== */
.recfx { position: fixed; inset: 0; z-index: 4000; cursor: pointer; overflow: hidden; background: radial-gradient(ellipse at center, rgba(74,64,54,.12), rgba(74,64,54,.42)); animation: recfxIn .4s; }
@keyframes recfxIn { from { opacity: 0; } }
.recfx-banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); text-align: center; background: linear-gradient(150deg, #fffdf9, #fdf3d8); border: 3px solid #c9a227; border-radius: 20px; padding: 26px 46px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: recPop .7s cubic-bezier(.2, 1.6, .4, 1); max-width: 84vw; }
.recfx-banner .t { font-size: 29px; font-weight: 800; color: #b45a2b; font-family: "Hiragino Mincho ProN", serif; letter-spacing: .04em; text-shadow: 0 2px 0 #fff; line-height: 1.4; }
.recfx-banner .s { font-size: 15px; color: #6b5c4a; margin-top: 10px; }
.recfx-banner small { display: block; margin-top: 10px; color: #a89a88; font-size: 10.5px; }
@keyframes recPop { 0% { transform: translate(-50%, -50%) scale(.15) rotate(-8deg); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.08) rotate(1.5deg); } 100% { transform: translate(-50%, -50%) scale(1); } }
.recfx-confetti { position: absolute; inset: 0; pointer-events: none; }
.recfx-confetti i { position: absolute; top: -24px; width: 10px; height: 16px; border-radius: 3px; animation: cfFall 3.2s linear infinite; opacity: .95; }
@keyframes cfFall { 0% { transform: translateY(-30px) rotate(0deg); } 100% { transform: translateY(106vh) rotate(760deg); } }
.recfx-komo { position: absolute; bottom: 13%; left: 0; width: 100%; pointer-events: none; }
.recfx-komo svg { width: 290px; height: auto; animation: komoDash 2.7s linear infinite; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
@keyframes komoDash { 0% { transform: translateX(-330px); } 100% { transform: translateX(105vw); } }
.recfx-fire { position: absolute; inset: 0; pointer-events: none; }
.recfx-fire span { position: absolute; font-size: 76px; animation: fireBoom 1.5s ease-out infinite; }
.recfx-fire span:nth-child(1) { left: 13%; top: 18%; }
.recfx-fire span:nth-child(2) { right: 11%; top: 28%; animation-delay: .4s; }
.recfx-fire span:nth-child(3) { left: 20%; bottom: 20%; animation-delay: .8s; }
.recfx-fire span:nth-child(4) { right: 22%; bottom: 14%; animation-delay: 1.1s; }
@keyframes fireBoom { 0% { transform: scale(.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

/* 記録更新のあゆみ + 歴代トップ3 */
.inqw-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.inqw-left { flex: none; width: 852px; max-width: 100%; }
.inqw-recwrap { flex: 1 1 210px; min-width: 210px; max-width: 248px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 1180px) { .inqw-split { flex-direction: column; } .inqw-recwrap { width: 100%; } }
.inqw-recbox { width: 100%; background: #fffdf9; border: 1.5px solid #eadfce; border-radius: 12px; padding: 10px 14px; }
.inqw-recbox h3, .inqw-top3 h3 { font-size: 12px; margin-bottom: 6px; color: var(--ink); }
.inqw-recbox .scr { max-height: 150px; overflow: auto; scrollbar-width: thin; }
.inqw-recbox .it { font-size: 10.5px; padding: 3px 2px; border-bottom: 1px dashed #f0e6d2; line-height: 1.5; }
.inqw-recbox .it:last-child { border-bottom: none; }
.inqw-recbox .it .v { color: #b45a2b; }
.inqw-recbox .it .old { color: #a89a88; font-size: 10.5px; margin-left: 4px; }
.inqw-top3 { width: 100%; background: linear-gradient(150deg, #fffdf9, #fdf6e5); border: 1.5px solid #e0c98f; border-radius: 12px; padding: 10px 14px; }
.inqw-top3 .r { font-size: 12px; padding: 2px 0; }
.inqw-top3 .r b { color: #b45a2b; }
.inqw-top3 .r small { color: #a89a88; margin-left: 6px; }

/* 投稿履歴(目安箱・教えてBOX共通) + ナレッジの穴の全文表示 */
.hist-it { font-size: 11.5px; padding: 5px 2px; border-bottom: 1px dashed #f0e6d2; line-height: 1.7; color: var(--ink); }
.hist-it:last-child { border-bottom: none; }
.hist-it .st { display: inline-block; font-size: 10px; border-radius: 999px; padding: 1px 8px; margin-right: 6px; background: #f0ece2; color: #8a7a66; }
.hist-it .st.adopted, .hist-it .st.approved { background: #e3f2e3; color: #2e7d32; }
.hist-it .st.declined, .hist-it .st.rejected { background: #f4e8e6; color: #a05545; }
.hist-it .st.considering { background: #fff3d6; color: #9a6b00; }
.hist-it .d { color: #a89a88; margin-right: 4px; }
.sugg-mine { margin-top: 10px; border-top: 1.5px dashed #eadfce; padding-top: 10px; }
.hh-mine { margin-top: 10px; border-top: 1px dashed #eadfce; padding-top: 10px; }
.gap-full { background: #faf6ec; border: 1px solid #eee3d2; border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.gap-full .q { font-size: 11.5px; line-height: 1.8; margin-bottom: 6px; white-space: pre-wrap; }
.gap-full .q b { color: #8a6845; }
.gap-full .scr { max-height: 220px; overflow: auto; background: #fffdf9; border: 1px solid #f0e6d2; border-radius: 8px; padding: 7px 10px; margin-top: 4px; white-space: pre-wrap; scrollbar-width: thin; }
.gap-full .scr.ex { background: #f4f9f4; }
.gap-full a { color: #b45a2b; font-size: 11.5px; }

/* 管理者はサイドバー項目が多いので行間を詰める(閲覧/編集者は従来のゆったり) */
.app.is-admin .sidebar nav a { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
.app.is-admin .sidebar .navhead { margin-top: 10px; }

/* 📝 Todoリスト(Keynote風3列) */
.td-tip { background: #fffcf2; border: 1px solid #eadfce; border-radius: 10px; padding: 9px 14px; font-size: 11.5px; color: var(--ink-soft, #6b5c4a); line-height: 1.75; margin-bottom: 14px; }
.td-save { font-weight: 700; color: #b45a2b; }
.td-save.ok { color: #2e7d32; }
.td-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .td-cols { grid-template-columns: 1fr; } }
.td-col { background: #fffdf9; border: 1.5px solid #eadfce; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.td-coltitle { border: none; border-bottom: 2px solid #eadfce; background: transparent; font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 4px 2px; outline: none; }
.td-coltitle:focus { border-bottom-color: var(--accent); }
.td-count { font-size: 10px; color: var(--ink-faint); text-align: right; }
.td-area { width: 100%; min-height: 460px; border: none; resize: vertical; outline: none; background: transparent; font-family: inherit; font-size: 13px; line-height: 1.9; color: var(--ink); padding: 2px; }
.td-datebtn { align-self: flex-start; border: 1px dashed #c9b28c; background: #fffdf9; color: var(--ink); border-radius: 8px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.td-datebtn:hover { border-color: var(--accent); color: var(--accent); }

/* 🔔 完了見込みの通知(Todoページ) */
.td-cand { background: #f4f9f4; border: 1.5px solid #cfe5cf; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.td-cand h3 { font-size: 12.5px; color: #2e7d32; margin-bottom: 7px; }
.td-candit { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 12px; padding: 4px 0; border-top: 1px dashed #d5e8d5; }
.td-candit .chk { font-size: 10px; background: #e3f2e3; color: #2e7d32; border-radius: 999px; padding: 1px 8px; }
.td-candit .note { color: var(--ink-soft, #6b5c4a); }
.td-candit .src { color: var(--ink-faint); font-size: 10.5px; }
.td-candit button { margin-left: auto; border: 1px solid #cfe5cf; background: #fff; color: #2e7d32; border-radius: 8px; padding: 3px 12px; font-size: 11px; cursor: pointer; }
.td-candit button:hover { background: #2e7d32; color: #fff; }

/* ============================================================
   📱 プルトゥリフレッシュ(スマホ) — 2026-07-17
   ============================================================ */
.ptr {
  position: fixed; top: 0; left: 50%; z-index: 5000;
  transform: translate(-50%, -62px);
  display: flex; align-items: center; gap: 8px;
  background: #fffdf9; border: 1.5px solid #eadfce; border-radius: 999px;
  padding: 8px 18px; font-size: 12.5px; font-weight: 600; color: #6d6058;
  box-shadow: 0 8px 26px rgba(90, 70, 50, .18);
  pointer-events: none; white-space: nowrap;
}
.ptr.ready { color: #2e7d32; border-color: #cfe5cf; background: #f4f9f4; }
.ptr .ptr-hari { font-size: 17px; line-height: 1; transition: transform .15s; }
.ptr.ready .ptr-hari { transform: rotate(180deg); }
.ptr.spin .ptr-hari { animation: ptrSpin .8s linear infinite; transform: none; }
@keyframes ptrSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ============================================================
   📜 投稿履歴の添付プレビュー(教えてBOX・目安箱共通) — 2026-07-17
   ============================================================ */
.hist-att { display: block; margin: 4px 0 2px; }
.hist-att img {
  max-height: 92px; max-width: 200px; border-radius: 8px;
  border: 1.5px solid #eadfce; display: block; background: #fff;
}
.hist-att img:hover { border-color: #c9a878; }
.hist-att .pdf {
  display: inline-block; font-size: 11px; color: #8a6450;
  border: 1px dashed #c9b28c; border-radius: 8px; padding: 3px 10px; background: #fffdf9;
}
.hist-att .pdf:hover { border-color: #8a6450; }

/* 目安箱の添付UI(教えてBOXと同じ操作感) */
.sugg-attrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sugg-file {
  font-size: 11.5px; color: #8a7a66; cursor: pointer;
  border: 1px dashed #c9b28c; border-radius: 8px; padding: 4px 12px; background: #fffdf9;
}
.sugg-file:hover { color: #8a6450; border-color: #8a6450; }
.sugg-attname { font-size: 11.5px; color: #6d6058; }
.sugg-attx { border: none; background: transparent; color: #a05545; cursor: pointer; font-size: 12px; }

/* ============================================================
   🌰 ハリちゃんのごはんタイム(えさやりアニメ) — 2026-07-17
   ============================================================ */
.hh-feedbtn {
  display: block; margin: 6px auto 0; cursor: pointer;
  border: 1.5px solid #d9c08c; background: linear-gradient(150deg, #fffdf9, #fdf3e0);
  border-radius: 999px; padding: 5px 18px; font-size: 12px; font-weight: 600; color: #8a6450;
}
.hh-feedbtn:hover:not(:disabled) { border-color: #b98a4a; color: #6d4a2e; }
.hh-feedbtn:disabled { opacity: .75; cursor: default; }
.hh-pel circle { transform-box: fill-box; transform-origin: center; }
.hh-pel-in { animation: hhPelDrop .95s cubic-bezier(.32, .72, .42, 1.18) backwards; }
@keyframes hhPelDrop {
  0% { transform: translateY(-215px); opacity: 0; }
  18% { opacity: 1; }
  74% { transform: translateY(0); }
  86% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.hh-pel.ate circle { animation: hhPelAte .55s ease forwards; }
@keyframes hhPelAte { to { transform: scale(.05); opacity: 0; } }
.hh-hopg { transform-box: fill-box; transform-origin: center bottom; animation: hhHop .55s ease-in-out 3; }
@keyframes hhHop {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-46px); }
  60% { transform: translateY(-40px); }
}
.hh-say { font-size: 11.5px; fill: #8a6450; font-weight: 600; }

/* ============================================================
   📱 LINE回答ログ + 👑院長の添削 — 2026-07-17
   ============================================================ */
.ll-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.ll-filter button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 14px; font-size: 11.5px; color: var(--ink-soft); cursor: pointer;
}
.ll-filter button.on { background: #5d4632; color: #fff; border-color: #5d4632; }
.ll-sheet { margin-left: auto; font-size: 11px; color: var(--series-2); }
.ll-item { margin-bottom: 12px; border-left: 3px solid #d9cdbc; }
.ll-item.approved { border-left-color: #2e7d32; }
.ll-item.new { border-left-color: #d9a53c; }
.ll-head { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--ink-faint); flex-wrap: wrap; }
.ll-head .chip { border-radius: 20px; padding: 1px 10px; font-weight: 600; font-size: 10.5px; }
.ll-head .chip.ok { background: #eef7ee; color: #2e7d32; }
.ll-head .chip.new { background: #fdf3dd; color: #9a6b1a; }
.ll-head .chip.skip { background: #f0eeea; color: #8d8178; }
.ll-head .sent { color: #2e7d32; }
.ll-q { font-size: 13px; font-weight: 600; margin: 8px 0 6px; line-height: 1.7; }
.ll-a { border-radius: 10px; padding: 8px 12px; margin-top: 6px; font-size: 12px; line-height: 1.8; }
.ll-a b { font-size: 10.5px; display: block; margin-bottom: 2px; }
.ll-a p { margin: 0; white-space: pre-wrap; }
.ll-a.bot { background: #f4f2ec; color: var(--ink-soft); }
.ll-a.fix { background: #eef4fa; border: 1px solid #cfdfee; }
.ll-a.master { background: #fdf6e3; border: 1.5px solid #e0c25a; }
.ll-judge { margin-top: 8px; }
.ll-judge textarea {
  width: 100%; box-sizing: border-box; border: 1.5px dashed #e0c25a; border-radius: 10px;
  padding: 8px 10px; font-size: 12px; font-family: inherit; background: #fffdf6;
}
.ll-judgerow { display: flex; gap: 8px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.ll-judgerow select { font-size: 11.5px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); }
.ll-judgerow button { border-radius: 9px; padding: 5px 14px; font-size: 11.5px; cursor: pointer; border: 1px solid var(--line); background: #fff; }
.ll-judgerow button.ok { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.ll-judgerow button.skip { color: var(--ink-faint); }
.hh-master {
  width: 100%; box-sizing: border-box; border: 1.5px dashed #e0c25a; border-radius: 10px;
  padding: 8px 10px; font-size: 12px; font-family: inherit; background: #fffdf6; margin-top: 6px;
}
.hh-masternote {
  background: #fdf6e3; border: 1px solid #e0c25a; border-radius: 8px;
  padding: 4px 10px; margin-top: 4px; font-size: 11.5px; color: #6d4a2e;
}

/* LINE回答ログ: 院バッジ・低優先(日程/挨拶)の折りたたみ — 2026-07-18 */
.ll-head .clinic { background: #5d4632; color: #fff; border-radius: 6px; padding: 1px 8px; font-size: 10px; font-weight: 600; }
.ll-head .lowtag { color: var(--ink-faint); font-size: 10px; }
.ll-lowwrap { margin-top: 16px; }
.ll-lowwrap > summary {
  cursor: pointer; font-size: 12px; color: var(--ink-faint);
  padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; background: #faf8f3;
}
.ll-lowwrap > summary:hover { color: var(--ink-soft); }
.ll-lowwrap .ll-item { margin-top: 8px; }
.ll-item.ll-low { opacity: .82; }
.ll-item.ll-low .ll-q { font-size: 12px; font-weight: 500; }
.ll-item.ll-low .ll-a { font-size: 11px; padding: 5px 10px; }

/* ============================================================
   🔄 知識の還流ページ + Todoへの移設物(ミッション窓/チェックリスト) — 2026-07-18
   ============================================================ */
.kf-title { position: relative; }
.kf-mapbtn {
  position: absolute; right: 0; top: 6px; font-size: 11.5px; color: #5d4632;
  border: 1.5px solid #d9c08c; border-radius: 999px; padding: 5px 14px; background: #fffdf9;
}
.kf-mapbtn:hover { border-color: #b98a4a; }
.kf-nav {
  position: sticky; top: 0; z-index: 40; display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--paper, #f7f4ec); padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.kf-nav button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 11.5px; color: var(--ink-soft); cursor: pointer;
}
.kf-nav button:hover { border-color: #b98a4a; color: #5d4632; }
.kf-nav button b { margin-left: 4px; background: #d02a1e; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10px; }
.kf-sec { margin-bottom: 26px; scroll-margin-top: 54px; }
.kf-sec > h2 { font-size: 15px; margin: 0 0 8px; }
.kf-sec > h2 small { font-weight: 400; font-size: 10.5px; color: var(--ink-faint); margin-left: 8px; }
.kf-q { margin-bottom: 10px; }
.kf-q .q { font-size: 13px; font-weight: 600; line-height: 1.7; }
.kf-q .b { font-size: 12.5px; font-weight: 600; }
.kf-q .t { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.7; }
.kf-q textarea {
  width: 100%; box-sizing: border-box; border: 1.5px dashed #e0c25a; border-radius: 10px;
  padding: 8px 10px; font-size: 12px; font-family: inherit; background: #fffdf6; margin-top: 6px;
}
.kf-msg { font-size: 12px; color: #2e7d32; }
.kf-more { border: none; background: none; color: var(--series-2); cursor: pointer; font-size: 11px; margin-left: 6px; }

/* Todoページ: チェックリスト+課題(旧AI全体マップ) */
.td-sub { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; align-items: flex-start; }
.td-sub .panel { flex: 1 1 340px; }
.td-sub h3 { font-size: 13.5px; margin: 0 0 8px; }
.td-sub h3 small { font-weight: 400; color: var(--ink-faint); font-size: 10.5px; }
.ckl { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px dashed #f0e6d2; }
.ckl .freq { flex: none; font-size: 9.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-top: 2px; }
.ckl .freq.d { background: #fde3dd; color: #b3402e; }
.ckl .freq.w { background: #fff3d6; color: #9a6b00; }
.ckl .freq.m { background: #e3edf7; color: #2b5d8a; }
.ckl .freq.z { background: #e8e5df; color: #6d6058; }
.ckl p { margin: 0; font-size: 12px; line-height: 1.7; }
.ckl p small { color: var(--ink-faint); margin-left: 4px; }
.td-lack ul { margin: 0; padding-left: 4px; list-style: none; }
.td-lack li { font-size: 12px; line-height: 1.9; }

/* 🎯 ミッション浮き窓 */
.mw {
  position: fixed; z-index: 900; width: 340px; max-width: 92vw;
  background: #fffdf7; border: 1.5px solid #d9c08c; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(120, 100, 80, .3); overflow: hidden;
}
.mw-head {
  background: linear-gradient(135deg, #8a6845, #b3902f); color: #fff; font-size: 11.5px;
  padding: 7px 12px; cursor: grab; user-select: none; display: flex; justify-content: space-between; align-items: center;
}
.mw-min { border: none; background: rgba(255,255,255,.2); color: #fff; border-radius: 6px; cursor: pointer; font-size: 10px; padding: 1px 7px; }
.mw-body { max-height: 60vh; overflow: auto; padding: 8px 12px 10px; font-size: 11.5px; line-height: 1.7; }
.mw-it { display: flex; gap: 7px; align-items: flex-start; padding: 5px 0; border-bottom: 1px dashed #f0e6d2; cursor: pointer; }
.mw-it input { margin-top: 3px; }
.mw-tag { font-style: normal; font-size: 9px; border-radius: 999px; padding: 1px 6px; margin-right: 4px; }
.mw-tag.h { background: #fff3d6; color: #9a6b00; }
.mw-tag.g { background: #e3f2e3; color: #2e7d32; }
.mw-cand { font-style: normal; font-size: 9px; background: #e3f2e3; color: #2e7d32; border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.mw-done { margin-top: 8px; }
.mw-donetitle { font-size: 10.5px; color: var(--ink-faint); font-weight: 700; }
.mw-it.done span, .mw-it.done { color: #9a8f80; text-decoration: line-through; }
.mw-it.done.auto { text-decoration: none; color: #7a8f6a; cursor: default; }

/* 📊 知識の還流: 実績タイル+分野別達成度 / 👀閲覧者ビュー — 2026-07-18 */
.kf-stats { margin-bottom: 14px; }
.kf-tiles { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.kf-tile {
  flex: 1 1 120px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; text-align: center;
}
.kf-tile b { display: block; font-size: 22px; color: #5d4632; }
.kf-tile span { font-size: 10.5px; color: var(--ink-faint); }
.kf-cats { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.kf-catstitle { font-size: 11px; color: var(--ink-faint); margin-bottom: 8px; }
.kf-cat { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.kf-cat .lbl { flex: 0 0 170px; font-size: 12px; }
.kf-cat .bar { flex: 1; height: 10px; background: #f0ebe0; border-radius: 999px; overflow: hidden; }
.kf-cat .fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #c9a878, #7c8752);
  transition: width .8s cubic-bezier(.3,.7,.4,1);
}
.kf-cat .pct { flex: 0 0 84px; font-size: 11.5px; font-weight: 700; color: #5d4632; text-align: right; }
.kf-cat .pct small { font-weight: 400; color: var(--ink-faint); }
.nav-tiny.viewas { color: #c9a227; }

/* 知識の還流: コンパクト実績(ジャンプボタン右) / 閲覧者ビュー(のべ来訪の上・小) — 2026-07-18 */
.kf-mini { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.kf-mini .ans { font-size: 11px; font-weight: 700; color: #5d4632; white-space: nowrap; }
.kf-mini .cat { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; width: 34px; }
.kf-mini .cat i { font-style: normal; font-size: 8.5px; color: var(--ink-faint); }
.kf-mini .cat em { display: block; width: 100%; height: 4px; background: #ece5d8; border-radius: 999px; overflow: hidden; }
.kf-mini .cat em b { display: block; height: 100%; background: linear-gradient(90deg, #c9a878, #7c8752); border-radius: 999px; transition: width .8s; }
.viewas-top {
  display: block; text-align: center; font-size: 9.5px; color: #b9a26a;
  padding: 2px 0 4px; letter-spacing: .06em;
}
.viewas-top:hover { color: #e0c25a; }

/* ================= 🔄 知識の還流 2026-07-19改修(清書ウィンドウ・済み/いいね) ================= */
/* 👑 知識の清書ウィンドウ(掴んで動かせる固定ウィンドウ) */
.kf-win {
  position: fixed; top: 110px; right: 26px; z-index: 60;
  width: min(430px, calc(100vw - 40px));
  background: #fffdf8; border: 1.5px solid #d9b845; border-radius: 14px;
  box-shadow: 0 14px 42px rgba(120, 90, 40, .22);
  display: flex; flex-direction: column; overflow: hidden;
  resize: both; min-width: 300px; min-height: 46px; max-width: 92vw;
}
.kf-win.min { resize: none; height: auto; }
.kf-winhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; cursor: grab; user-select: none; touch-action: none;
  background: linear-gradient(135deg, #5d4632, #7a5c40); color: #f7ecd7;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.kf-winhead:active { cursor: grabbing; }
.kf-winmin {
  border: none; background: rgba(255,255,255,.16); color: #f7ecd7; border-radius: 7px;
  width: 24px; height: 22px; cursor: pointer; font-size: 13px; line-height: 1;
}
.kf-winbody { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; min-height: 0; }
.kf-winhint { font-size: 11px; color: var(--ink-soft); line-height: 1.7; margin: 0; }
.kf-winbody textarea {
  width: 100%; flex: 1; min-height: 380px; resize: vertical;
  border: 1px solid #e0d4bd; border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.8; background: #fff; font-family: inherit;
}
.kf-winrow { display: flex; gap: 8px; align-items: center; }
.kf-winrow select { font-size: 11.5px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.kf-winsend {
  display: block; width: 100%; border: none; border-radius: 10px; padding: 13px 0; cursor: pointer;
  background: linear-gradient(135deg, #1f6b24, #2e7d32); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .06em;
  writing-mode: horizontal-tb; white-space: nowrap;
}
.kf-winsend:hover { filter: brightness(1.06); }
.kf-winsend:disabled { opacity: .6; cursor: default; }
.kf-winmsg { font-size: 11.5px; color: #2e7d32; margin: 0; }
.kf-wincount { font-size: 10.5px; color: var(--ink-faint); margin: 0; }

/* 「済み」ボタンと「いいね」列 */
.kf-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.kf-row .q { flex: 1; margin-top: 0; }
.kf-done {
  border: 1px solid #2e7d32; background: #fff; color: #2e7d32;
  border-radius: 9px; padding: 4px 18px; font-size: 12px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.kf-done:hover { background: #2e7d32; color: #fff; }
.kf-likes { display: inline-flex; align-items: center; gap: 4px; }
.kf-likes i { font-style: normal; font-size: 13px; margin-right: 2px; }
.kf-likes button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 7px; width: 26px; height: 24px; font-size: 11.5px; cursor: pointer; line-height: 1;
}
.kf-likes button:hover { border-color: #d9a53c; color: #b9822a; }
.kf-likes button.on { background: #d9a53c; border-color: #d9a53c; color: #fff; font-weight: 700; }
.kf-likes b { font-size: 10.5px; color: #b9822a; margin-left: 4px; white-space: nowrap; }

/* 縦をつめたカード */
.kf-compact { padding: 9px 14px; }
.kf-compact .t { margin-top: 2px; }
.kf-gapline { padding: 7px 14px; margin-bottom: 6px; }
.kf-gapline .q { font-size: 12px; }
.kf-gapline .t { margin-top: 6px; }

/* 📱 LINE回答ログのコンパクト表示(知識の還流ページ内・2/3表示) */
.ll-compact .ll-item { margin-bottom: 8px; }
.ll-compact .ll-item.panel { padding: 9px 14px; }
.ll-compact .ll-q { font-size: 12px; }
.ll-compact .ll-a { font-size: 11.5px; padding: 5px 10px; margin-top: 4px; }
.ll-compact .ll-a p { margin: 0; }
.ll-compact .ll-judge textarea { min-height: 30px; }
.ll-morebtn {
  display: block; width: 100%; margin: 4px 0 10px; padding: 7px 0; cursor: pointer;
  border: 1px dashed #c9b58f; background: #fbf7ee; color: #7a5c40; border-radius: 10px; font-size: 12px;
}
.ll-morebtn:hover { background: #f4ecd9; }

/* 🏆 投稿カウント表(目安箱ページ・管理者のみ) */
.kudos-table { width: 100%; border-collapse: collapse; margin-top: 8px; background: #fff; border-radius: 10px; overflow: hidden; }
.kudos-table th {
  text-align: left; font-size: 10.5px; letter-spacing: .1em; color: var(--ink-faint);
  padding: 8px 12px; border-bottom: 1px solid var(--line); font-weight: 600; background: #faf6ee;
}
.kudos-table td { padding: 8px 12px; font-size: 12.5px; border-bottom: 1px solid #f0e9dc; }
.kudos-table td:nth-child(3), .kudos-table td:nth-child(4) { font-variant-numeric: tabular-nums; font-weight: 700; color: #5d4632; }
.kudos-table tr.first td { background: #fdf6e2; }
.kudos-table tr.top3 td { background: #fbf8f0; }

/* スマホ: 清書ウィンドウは画面下に寄せる */
@media (max-width: 700px) {
  .kf-win { top: auto; bottom: 12px; right: 10px; left: 10px; width: auto; max-height: 60vh; }
  .kf-winbody textarea { min-height: 110px; }
}

/* 2026-07-19(2): 追加調整 */
.kf-row { justify-content: flex-start; }
.kf-morebtn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 9px; padding: 4px 14px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.kf-morebtn:hover { border-color: #b98a4a; color: #5d4632; }

/* 📷 症例写真: coming soon と要望BOX */
.cp-soon { margin-top: 18px; border-left: 4px solid #d9b845; }
.cp-soon p { font-size: 12.5px; line-height: 2; color: var(--ink-soft); margin: 0; }
.cp-req { margin-top: 12px; }
.cp-reqform { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.cp-reqform input { width: 110px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.cp-reqform textarea { flex: 1; min-width: 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.7; }

/* 🌸 進化のあゆみ: 次に花開くもの */
.evo-bloom { border: 1.5px solid #e3b7c8; background: linear-gradient(160deg, #fffdfb, #fdf4f7); }
.evo-bloom h2 { color: #b06a85 !important; }
.evo-soon { font-size: 10px; background: #b06a85; color: #fff; border-radius: 999px; padding: 2px 8px; margin: 0 6px; white-space: nowrap; }

/* 🏡 ハリちゃんの物知り度(大きめバッジ) */
.hh-monoshiri {
  margin: 10px 0 4px; padding: 10px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #eaf2fb, #dcebfa); border: 1.5px solid #7ba7d9;
  color: #2b5e9c; font-size: 14px; font-weight: 700; display: flex; align-items: baseline; gap: 8px;
}
.hh-monoshiri b { font-size: 24px; color: #1f4f8f; font-variant-numeric: tabular-nums; }
.hh-monoshiri small { font-weight: 400; font-size: 10.5px; color: #6d8db3; }

/* 📱 LINE回答ログ: AI案生成ボタンとバッジ */
.ll-genbtn {
  border: 1px solid #2b5e9c; background: #fff; color: #2b5e9c; border-radius: 999px;
  padding: 5px 14px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.ll-genbtn:hover { background: #2b5e9c; color: #fff; }
.ll-genbtn:disabled { opacity: .55; cursor: default; }
.ll-aitag { font-size: 9.5px; background: #2b5e9c; color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }

/* SNS: 過去最高バッジ / ランキング変動矢印(2026-07-25) */
.tile .sns-best { font-size: 11px; font-weight: 700; color: #b8860b; margin-top: 3px; letter-spacing: .02em; }
.sns-rup { color: #e03131; font-weight: 900; font-size: 12px; margin-left: 5px; }
.sns-rdn { color: #1971c2; font-weight: 900; font-size: 12px; margin-left: 5px; }

/* 🦔 ハリちゃんの家: 足のとことこ運び(2026-07-25) */
.hh-leg { transform-box: fill-box; transform-origin: center; }
.hh-leg-a { animation: hhStep 0.62s ease-in-out infinite; }
.hh-leg-b { animation: hhStep 0.62s ease-in-out infinite; animation-delay: 0.31s; }
@keyframes hhStep {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-7px) translateX(3px); }
}

/* 🎯 集患・空きオペ枠ボード(経営ダッシュボード・2026-07-26) */
.slotlist { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.slotrow { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.slotrow.is-empty { border-color: #e6b0a6; background: #fdf3f1; }
.slot-date { min-width: 74px; font-size: 13px; font-weight: 700; }
.slot-date small { font-weight: 400; color: var(--ink-faint); font-size: 11px; }
.slot-doc { flex: 1; font-size: 13px; font-weight: 700; }
.slot-doc small { font-weight: 400; color: var(--ink-soft); }
.slot-b { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.slot-b.empty { background: #f6d3cc; color: #b0342a; }
.slot-b.thin { background: #f7e6c4; color: #9a6a12; }
.slot-b.ok { background: #d9efe0; color: #2e7d5b; }

/* 業績: 月次×担当医の明細テーブル(2026-07-27) */
.perf-tbl { border-collapse: collapse; font-size: 10.5px; }
.perf-tbl th, .perf-tbl td { border: 1px solid var(--line); padding: 2px 6px; text-align: right; white-space: nowrap; }
.perf-tbl th.sticky, .perf-tbl td.sticky { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 700; z-index: 1; }
.perf-tbl thead th { background: #faf6ef; }
.perf-tbl tr.b td { font-weight: 800; background: #fdf6ee; }

/* 🌱 医師別SNS成長ボード(2026-07-27) */
.sns-grow { display:flex; flex-direction:column; gap:4px; margin-top:8px; min-width:520px; }
.sns-grow-row { display:grid; grid-template-columns:34px 1.1fr 1.4fr 0.9fr 1.4fr; align-items:center; gap:10px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; font-size:12px; }
.sns-grow-row .rk { font-size:15px; text-align:center; }
.sns-grow-row .nm { font-weight:700; }
.sns-grow-top { background:linear-gradient(135deg,#eef8f1,#fbfffc); border:1.5px solid #2e7d5b; border-radius:8px; padding:8px 12px; margin-top:6px; font-size:13px; color:#2e7d5b; }
.sns-up { color:#2e7d5b; }

/* 医師別SNS成長ボード深掘り + TikTok(2026-07-27) */
.sns-grow { min-width:640px; }
.sns-grow-row { grid-template-columns:32px 1.6fr 1.4fr 70px 0.8fr 1.3fr; }
.sns-grow-row .nm2 { min-width:0; }
.sns-grow-row .nm { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.sns-grow-row .strk { font-size:10.5px; font-weight:800; color:#d1600b; background:#fff2e2; border-radius:999px; padding:1px 7px; }
.sns-grow-row .ms { height:5px; background:#eee6da; border-radius:999px; margin:3px 0 1px; overflow:hidden; }
.sns-grow-row .msbar { display:block; height:100%; background:#7bbf9a; }
.sns-grow-row .mstxt { font-size:10px; color:var(--ink-faint); }
.sns-grow-row .spk { display:flex; align-items:center; }

/* SNSのいま 整理: カレンダーにフォロワー合体 + 成長ホバー + バズ型(2026-07-27) */
.sns-cal .sns-calsum { min-width: 124px; }
.sns-calsum.sns-calstat { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.sns-calstat .sns-fol { font-size:12.5px; font-weight:700; white-space:nowrap; }
.sns-calstat .sns-fol b { margin-left:4px; font-size:11px; }
.sns-dn { color:#c2418c; }
.sns-grw { position:relative; cursor:default; font-size:13px; }
.sns-grw-pop { display:none; position:absolute; right:0; top:20px; z-index:50; background:#fff; border:1px solid var(--line); box-shadow:0 6px 20px rgba(0,0,0,.18); border-radius:8px; padding:8px 10px; width:210px; }
.sns-grw:hover .sns-grw-pop { display:flex; flex-direction:column; gap:3px; }
.sns-grw-pop b { font-size:12px; }
.sns-grw-pop span { font-size:11px; color:var(--ink-soft); }
.sns-buzz { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.sns-buzz-c { border:1px solid var(--line); border-radius:8px; padding:8px 12px; background:#fff; }
.sns-buzz-c .t { font-weight:800; font-size:13px; }
.sns-buzz-c p { margin:3px 0; font-size:12px; color:var(--ink-soft); line-height:1.6; }
.sns-buzz-c .ex { font-size:11px; color:#b45a2b; }

/* フォロワー欄 右揃え+見出し / バズリンク(2026-07-27) */
.sns-calsum.sns-calstat { display:grid !important; grid-template-columns:66px 42px 20px; align-items:center; gap:6px; justify-content:end; }
.sns-calstat .fol-n { text-align:right; font-weight:700; font-size:12.5px; white-space:nowrap; }
.sns-calstat .fol-d { text-align:right; font-size:11px; white-space:nowrap; }
.sns-calhdr .fol-n, .sns-calhdr .fol-d { font-weight:400; font-size:10px; color:var(--ink-faint); }
.sns-buzz-c .ex a { color:#b45a2b; text-decoration:underline; }

/* 🧪 botお試し試験台(知識の還流) */
.kf-test{border:1.5px solid #c9a23a;background:#fffdf5}
.kf-test-row{display:flex;gap:10px;align-items:stretch}
.kf-test-row textarea{flex:1;min-height:72px;padding:8px 10px;border:1px solid #d8d2c2;border-radius:8px;font-size:13px;line-height:1.6;resize:vertical}
.kf-test-btns{display:flex;flex-direction:column;gap:8px;justify-content:flex-start}
.kf-test-btns .run{background:#2c6e49;color:#fff;border:none;border-radius:8px;padding:10px 14px;font-weight:700;cursor:pointer;white-space:nowrap}
.kf-test-btns .run:disabled{opacity:.6;cursor:default}
.kf-test-btns .fix{background:#fff;border:1.5px solid #c9a23a;color:#8a6d1a;border-radius:8px;padding:8px 12px;font-weight:700;cursor:pointer;white-space:nowrap}
.kf-test-msg{color:#b3261e;font-size:12px;margin:6px 0 0}
.kf-test-ans{margin-top:10px;background:#f6f9f4;border:1px solid #cfe0c8;border-radius:8px;padding:10px 12px}
.kf-test-ans b{font-size:12px;color:#2c6e49}
.kf-test-ans p{margin:6px 0 0;font-size:13px;line-height:1.7;white-space:pre-wrap}
