:root {
  /* 落ち着いた癒やしのセージ／フォレストグリーン（安心感・自然） */
  --c-primary: #3f7256;
  --c-primary-dark: #2d5540;
  --c-primary-light: #e7f0e8;
  /* 温かみのあるテラコッタ（差し色・自然素材の温度感） */
  --c-accent: #b56c46;
  --c-accent-dark: #8f5233;
  --c-accent-light: #f6ece2;
  /* Cardio Flow Design の赤（心臓アイコン専用） */
  --c-heart: #b5181f;
  --c-text: #2b2a26;
  --c-muted: #6a655c;
  --c-border: #e6e0d5;
  /* 観葉植物のある診察室のような、ぬくもりのあるクリームベース */
  --c-bg: #f8f5ef;
  --c-bg-tint: #f2ede3;
  --c-white: #ffffff;
  --c-success: #2f7d54;
  --c-success-bg: #e7f2ea;
  --c-error: #a8442e;
  --c-error-bg: #f8ece6;
  --c-warn-bg: #fdf5e9;
  --c-warn-border: #ecd0a3;
  --radius: 14px;
  --radius-sm: 11px;
  --shadow: 0 1px 3px rgba(60, 50, 30, .05), 0 8px 24px rgba(60, 50, 30, .06);
  --shadow-soft: 0 1px 3px rgba(60, 50, 30, .06);
  --maxw: 860px;
  --font-serif: "Noto Serif JP", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", -apple-system,
    BlinkMacSystemFont, "Noto Sans JP", Meiryo, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.85;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .02em;
}

a { color: var(--c-primary-dark); }

h1 { font-family: var(--font-serif); font-weight: 500; letter-spacing: .04em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- ヘッダ（全幅バナー ＋ その下のメニュー） ---- */
.site-header { background: var(--c-white); }

.site-banner { display: block; line-height: 0; background: #eaf3ec; }
.site-banner img { display: block; width: 100%; height: auto; }

/* メニューはバナーの下に横一列。スクロールしても追従する。 */
.site-nav {
  background: var(--c-white); border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow-soft);
}
.site-nav .nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 12px;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.site-nav a {
  position: relative; text-decoration: none; color: var(--c-text);
  padding: 15px 20px; font-size: 15px; font-weight: 600; letter-spacing: .02em;
  transition: background .15s, color .15s;
}
/* 項目間の細い区切り線 */
.site-nav a + a::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 20px; background: var(--c-border);
}
.site-nav a:hover { background: var(--c-primary-light); color: var(--c-primary-dark); }
.site-nav a.is-current { color: var(--c-primary-dark); }
.site-nav a.is-current::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--c-primary);
}
@media (max-width: 780px) {
  .site-nav .nav-inner { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .site-nav .nav-inner::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 13px 15px; font-size: 14px; white-space: nowrap; }
}

/* ---- フッタ ---- */
.site-footer {
  margin-top: 64px; padding: 36px 0; border-top: 4px solid var(--c-primary);
  color: var(--c-muted); font-size: 15px; background: var(--c-white);
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.site-footer a { color: var(--c-primary-dark); }
.footer-org { display: flex; flex-wrap: wrap; gap: 24px 48px; margin-bottom: 20px; }
.footer-org .blk { font-size: 15px; }
.footer-org .blk .k { font-size: 12px; color: var(--c-muted); letter-spacing: .08em; margin-bottom: 2px; }
.footer-org .blk .v { font-size: 16px; color: var(--c-text); font-weight: 600; }
.footer-note { font-size: 13px; line-height: 1.8; }

/* ---- 本文 ---- */
main { padding: 32px 0 8px; }
h1 { font-size: 30px; line-height: 1.45; margin: 0 0 20px; letter-spacing: .01em; }
h2 { font-size: 23px; margin: 44px 0 18px; line-height: 1.5; }
/* 公開ページ本文の見出しのみ、丸みのある緑バッジ風に（管理画面には適用しない） */
.container h2 {
  display: inline-block; font-size: 19px; margin: 46px 0 20px; padding: 11px 24px;
  background: var(--c-primary); color: #fff; border-radius: 10px;
  line-height: 1.5; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(63, 114, 86, .18);
}
@media (max-width: 640px) { .container h2 { font-size: 17px; padding: 9px 18px; } }
h3 { font-size: 18px; margin: 26px 0 10px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 1.4em; }
li { margin-bottom: 10px; }

.lead { font-size: 20px; color: var(--c-text); line-height: 1.85; }
.muted { color: var(--c-muted); }
.small { font-size: 14px; }
@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .lead { font-size: 18px; }
}

/* ---- カード ---- */
.card {
  background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.card.tight { padding: 18px 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-width: 0; }
.grid-2 > * { min-width: 0; }
@media (max-width: 680px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- 入口カード（大きく・直感的） ---- */
.entry {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; color: inherit; transition: .18s;
  padding: 30px 24px; border-width: 2px;
}
.entry:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.entry .icon {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  margin-bottom: 14px;
}
.entry.patient .icon { background: var(--c-accent-light); }
.entry.doctor .icon { background: var(--c-primary-light); }
.entry .icon svg { width: 42px; height: 42px; }
.entry h3 { margin: 0 0 8px; font-size: 21px; }
.entry p, .entry .rich { font-size: 16px; color: var(--c-muted); margin: 0 0 18px; }
/* 管理画面で編集した本文（段落タグを含むことがある）を包む要素 */
.rich > p:last-child { margin-bottom: 0; }
.entry .go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 16px;
}
.entry.patient .go { color: var(--c-accent-dark); }
.entry.doctor .go { color: var(--c-primary-dark); }

/* ---- ボタン（大きめ・押しやすい） ---- */
.btn {
  display: inline-block; cursor: pointer; border: none; text-decoration: none;
  background: var(--c-primary); color: #fff; padding: 15px 30px; border-radius: 999px;
  font-size: 17px; font-weight: 700; font-family: inherit; transition: .15s;
  box-shadow: 0 3px 12px rgba(63, 114, 86, .28);
}
.btn:hover { background: var(--c-primary-dark); transform: translateY(-1px); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.lg { padding: 18px 36px; font-size: 19px; }
.btn.accent { background: var(--c-accent); box-shadow: 0 3px 12px rgba(181, 108, 70, .3); }
.btn.accent:hover { background: var(--c-accent-dark); }
.btn.secondary { background: #fff; color: var(--c-primary-dark); border: 2px solid var(--c-border); box-shadow: none; }
.btn.secondary:hover { background: var(--c-primary-light); border-color: var(--c-primary-light); }
.btn.danger { background: var(--c-error); box-shadow: none; }
.btn.danger:hover { background: #91160e; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---- 注意ボックス ---- */
.notice {
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 0 0 20px;
  background: var(--c-warn-bg); border: 1px solid var(--c-warn-border);
  font-size: 16px; line-height: 1.8;
}
.notice.danger { background: var(--c-error-bg); border-color: #f3b4af; }
.notice.info { background: var(--c-primary-light); border-color: #bcd6c1; }
.notice strong { display: block; margin-bottom: 6px; font-size: 16px; }
.notice p:last-child { margin-bottom: 0; }
.notice .ico { margin-right: 6px; }

/* ---- フラッシュ ---- */
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; font-size: 16px; }
.flash.success { background: var(--c-success-bg); color: var(--c-success); border: 1px solid #b6e2c6; }
.flash.error { background: var(--c-error-bg); color: var(--c-error); border: 1px solid #f3b4af; }
.flash.info { background: var(--c-primary-light); color: var(--c-primary-dark); border: 1px solid #bcd6c1; }

/* ---- フォーム ---- */
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 16px; }
.field .req { color: #fff; background: var(--c-accent); font-size: 12px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; vertical-align: middle; font-weight: 700; }
.field .opt { color: var(--c-muted); font-size: 13px; margin-left: 8px; font-weight: 500; }
.field .hint { font-size: 14px; color: var(--c-muted); margin: 6px 0 0; line-height: 1.7; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=url], .field input[type=number], .field input[type=date],
.field input[type=password], .field input[type=datetime-local],
.field select, .field textarea {
  width: 100%; padding: 14px 14px; border: 2px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 17px; font-family: inherit; background: #fff; color: var(--c-text);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(63,114,86,.15);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-error); }
.field .err { color: var(--c-error); font-size: 15px; margin: 7px 0 0; font-weight: 600; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; }
.checkbox input { margin-top: 5px; width: 22px; height: 22px; flex: none; accent-color: var(--c-primary); }
.checkbox label { font-weight: 500; font-size: 16px; }

/* ---- 枠リスト（大きく選びやすい） ---- */
.slot-list { list-style: none; padding: 0; margin: 0; }
.slot-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 2px solid var(--c-border); border-radius: var(--radius); padding: 20px 22px;
  margin-bottom: 14px; background: #fff; transition: .15s;
}
.slot-item:hover { border-color: var(--c-primary-light); box-shadow: var(--shadow-soft); }
.slot-item .dt { font-weight: 700; font-size: 19px; }
.slot-item .meta { font-size: 15px; color: var(--c-muted); margin-top: 4px; }
@media (max-width: 560px) { .slot-item { flex-direction: column; align-items: stretch; } .slot-item .btn { width: 100%; text-align: center; } }

/* ---- ステップ表示（直感的な流れ） ---- */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 8px; padding: 0; list-style: none; }
.flow li {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 20px 16px; text-align: center; position: relative; margin: 0;
}
.flow li .n {
  width: 38px; height: 38px; border-radius: 50%; background: var(--c-primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 17px; margin: 0 auto 10px;
}
.flow li .t { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.flow li .d { font-size: 14px; color: var(--c-muted); line-height: 1.7; }
@media (max-width: 600px) { .flow { grid-template-columns: 1fr; } }

/* ---- テーブル ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
table.data th { background: #f4efe8; font-size: 14px; color: var(--c-muted); }
table.data tr:hover td { background: #fbf9f6; }
table.data a { font-weight: 700; text-decoration: none; }

/* ---- バッジ ---- */
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }
.badge.pending { background: var(--c-warn-bg); color: #b45309; }
.badge.confirmed { background: #e0edff; color: #1d4ed8; }
.badge.declined { background: #ede9fe; color: #6d28d9; }
.badge.reserved { background: #e0edff; color: #1d4ed8; }
.badge.email { background: var(--c-accent-light); color: var(--c-accent-dark); }
.badge.online { background: var(--c-primary-light); color: var(--c-primary-dark); }
.badge.cancelled { background: #f1f3f4; color: #6b7280; }
.badge.completed { background: var(--c-success-bg); color: var(--c-success); }
.badge.no_show { background: var(--c-error-bg); color: var(--c-error); }
.badge.open { background: var(--c-success-bg); color: var(--c-success); }
.badge.closed { background: #f1f3f4; color: #6b7280; }
.badge.doctor { background: var(--c-primary-light); color: var(--c-primary-dark); }
.badge.patient { background: var(--c-accent-light); color: var(--c-accent-dark); }
.badge.both { background: #efe6fb; color: #6b21a8; }

/* ---- 定義リスト ---- */
dl.detail { display: grid; grid-template-columns: 190px 1fr; gap: 0; margin: 0; }
dl.detail dt { font-weight: 700; color: var(--c-muted); font-size: 15px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
dl.detail dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--c-border); word-break: break-word; font-size: 16px; }
@media (max-width: 560px) { dl.detail { grid-template-columns: 1fr; } dl.detail dt { padding-bottom: 0; border: none; } dl.detail dd { padding-top: 2px; } }

/* ---- やさしいリスト（チェック付き） ---- */
ul.check { list-style: none; padding: 0; }
ul.check li { position: relative; padding-left: 36px; margin-bottom: 14px; font-size: 17px; }
ul.check li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--c-primary-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233f7256' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ---- 図版（手術・血流解析イラスト） ---- */
figure.figure { margin: 22px 0; }
figure.figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-white);
}
figure.figure img.on-dark { border-color: #1c1c22; }
figure.figure figcaption {
  margin-top: 8px; font-size: 14px; color: var(--c-muted); text-align: center; line-height: 1.7;
}

/* ---- 構造化トップ（カードに頼らない） ---- */
body { overflow-x: hidden; }

/* 全幅の背景バンド（コンテナ内から画面端まで広げる） */
.band { width: 100vw; position: relative; left: 50%; margin-left: -50vw; padding: 38px 0; }
.band .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.band.tint { background: var(--c-primary-light); }
.band.warm { background: linear-gradient(180deg, var(--c-accent-light), #fff); }
.band .bandh { display: table; margin: 0 auto 22px; }

.reassure-line { text-align: center; max-width: 40em; margin: 20px auto 0; font-size: 16px; line-height: 1.9; color: var(--c-text); }

/* できること／できないこと：中央区切り線の2分割（枠なし） */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 10px 0; }
.compare > div { padding: 6px 20px; }
.compare .no { border-left: 1px solid var(--c-border); }
.compare .h { font-weight: 700; font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.compare .yes .h { color: var(--c-success); }
.compare .no .h { color: var(--c-error); }
.compare ul { list-style: none; padding: 0; margin: 0; }
.compare li { font-size: 16px; margin-bottom: 10px; padding-left: 22px; position: relative; text-wrap: pretty; }
.compare .yes li::before { content: "○"; position: absolute; left: 0; color: var(--c-success); font-weight: 700; }
.compare .no li::before { content: "×"; position: absolute; left: 0; color: var(--c-error); font-weight: 700; }
.compare .w { font-size: 14px; color: var(--c-error); margin: 10px 0 0; font-weight: 600; }
@media (max-width: 600px) {
  .compare { grid-template-columns: 1fr; }
  .compare > div { padding: 6px 4px; }
  .compare .no { border-left: none; border-top: 1px solid var(--c-border); padding-top: 18px; margin-top: 10px; }
}

/* ご利用の流れ：つなぎ線付きタイムライン */
.timeline { display: flex; position: relative; margin: 16px 0 6px; }
.timeline::before { content: ""; position: absolute; top: 23px; left: 16%; right: 16%; height: 2px; background: var(--c-border); }
.tl { flex: 1; text-align: center; position: relative; }
.tl .n {
  width: 48px; height: 48px; border-radius: 50%; background: var(--c-primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; margin: 0 auto 12px;
  box-shadow: 0 0 0 6px var(--c-bg);
}
.tl b { display: block; font-size: 16px; margin-bottom: 3px; }
.tl span { font-size: 14px; color: var(--c-muted); line-height: 1.6; display: block; padding: 0 6px; }
@media (max-width: 600px) {
  .timeline { flex-direction: column; gap: 6px; }
  .timeline::before { display: none; }
  .tl { display: flex; align-items: center; text-align: left; gap: 14px; }
  .tl .n { margin: 0; box-shadow: none; flex: none; }
  .tl span { padding: 0; }
}

.entries { margin-bottom: 26px; }

/* 安心訴求：枠なしの帯 */
.trust.bare { grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 6px; }
.trust.bare .t {
  background: none; border: none; box-shadow: none; padding: 10px 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.trust.bare .t span { font-size: 13px; color: var(--c-muted); line-height: 1.6; }
.trust.bare .t b { display: block; font-size: 15px; color: var(--c-text); margin-bottom: 1px; }
@media (max-width: 620px) {
  .trust.bare { grid-template-columns: 1fr; }
  .trust.bare .t { flex-direction: row; text-align: left; gap: 12px; padding: 8px 4px; }
  .trust.bare .t span { flex: 1; }
}

/* 安心の一文：枠なし・左アクセント */
.reassure-lite {
  border-left: 4px solid var(--c-accent); background: var(--c-accent-light);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 6px 0 30px;
  font-size: 16px; line-height: 1.85;
}

/* できること／できないこと：枠を外した軽い2段組 */
.cando { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 8px 0 12px; }
.cando .h { font-weight: 700; font-size: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.cando .yes .h { color: var(--c-success); }
.cando .no .h { color: var(--c-error); }
.cando ul { margin: 0; padding-left: 1.3em; }
.cando li { font-size: 16px; margin-bottom: 6px; }
.cando .w { font-size: 14px; color: var(--c-error); margin: 8px 0 0; font-weight: 600; }
@media (max-width: 600px) { .cando { grid-template-columns: 1fr; gap: 16px; } }

/* 流れ：枠なしの横並び */
.flow.bare { display: flex; gap: 10px; list-style: none; padding: 0; margin: 8px 0 6px; counter-reset: none; }
.flow.bare li { flex: 1; background: none; border: none; padding: 4px; margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.flow.bare .n { width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.flow.bare .tx { font-size: 14px; color: var(--c-muted); line-height: 1.6; }
.flow.bare .tx b { display: block; font-size: 16px; color: var(--c-text); margin-bottom: 2px; }
@media (max-width: 600px) {
  .flow.bare { flex-direction: column; gap: 12px; }
  .flow.bare li { flex-direction: row; text-align: left; gap: 14px; }
}

/* ---- 安心訴求ブロック ---- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 4px; }
.trust .t {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 20px 16px; text-align: center;
}
.trust .t .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--c-primary-light); display: grid; place-items: center; margin: 0 auto 10px; }
.trust .t .ti { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.trust .t .de { font-size: 14px; color: var(--c-muted); line-height: 1.7; }
@media (max-width: 620px) { .trust { grid-template-columns: 1fr; } .trust .t { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; } .trust .t .ic { margin: 0; flex: none; } }

.reassure {
  background: linear-gradient(160deg, var(--c-accent-light), #fff);
  border: 1px solid #ecdac6; border-radius: var(--radius); padding: 22px 24px; margin: 24px 0;
}
.reassure h3 { margin: 0 0 8px; font-size: 18px; color: var(--c-accent-dark); }
.reassure p { margin: 0; font-size: 16px; line-height: 1.85; }

/* ---- ページ冒頭の導入（バナーの下に置く見出し＋リード文） ---- */
.page-intro { margin-bottom: 26px; }
.page-intro h1 { margin-bottom: 14px; }
.page-intro .lead-text { font-size: 17px; color: var(--c-muted); line-height: 1.9; margin-bottom: 0; max-width: 44em; }

/* ---- 医師の紹介（控えめな写真＋短い紹介。各ページから医師紹介へ誘導する） ---- */
.doctor-teaser {
  display: grid; grid-template-columns: 168px 1fr; gap: 26px; align-items: start;
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-soft); margin: 6px 0 10px;
}
.doctor-teaser .dt-photo {
  width: 168px; height: 168px; object-fit: cover;
  border-radius: 12px; display: block;
}
.doctor-teaser .dt-role { font-size: 13px; color: var(--c-muted); margin-bottom: 3px; }
.doctor-teaser .dt-name {
  font-family: var(--font-serif); font-size: 23px; font-weight: 600; letter-spacing: .04em; margin-bottom: 10px;
}
.doctor-teaser .dt-en {
  display: block; font-family: inherit; font-size: 12px; color: var(--c-muted);
  font-weight: 500; letter-spacing: .03em; margin-top: 4px;
}
.doctor-teaser p, .doctor-teaser .rich { font-size: 15px; line-height: 1.9; color: var(--c-text); margin-bottom: 12px; }
.doctor-teaser .dt-link { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--c-primary-dark); }
.doctor-teaser .dt-link:hover { text-decoration: underline; }
@media (max-width: 620px) {
  .doctor-teaser { grid-template-columns: 1fr; gap: 16px; padding: 20px; justify-items: center; text-align: center; }
  .doctor-teaser .dt-photo { width: 150px; height: 150px; }
  .doctor-teaser p { text-align: left; }
}

/* ---- 医師紹介ページの見出し部 ---- */
/* 写真は元データが400px四方のため、拡大して粗くならない範囲の表示幅にしている */
.doctor-hero { display: grid; grid-template-columns: 240px 1fr; gap: 34px; align-items: start; margin: 20px 0 8px; }
.doctor-hero .dh-photo img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  box-shadow: 0 10px 28px rgba(45, 85, 64, .15);
}
.doctor-hero .dh-role { font-size: 14px; color: var(--c-muted); margin-bottom: 4px; }
.doctor-hero .dh-name {
  display: block; background: none; color: var(--c-text); box-shadow: none; padding: 0;
  font-family: var(--font-serif); font-size: 30px; font-weight: 600; letter-spacing: .04em;
  margin: 0 0 14px;
}
.doctor-hero .dh-en {
  display: block; font-family: inherit; font-size: 13px; color: var(--c-muted);
  font-weight: 500; letter-spacing: .03em; margin-top: 6px;
}
.doctor-hero .dh-lead { font-size: 16px; line-height: 1.95; }
.doctor-hero .dh-lead:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
  .doctor-hero { grid-template-columns: 1fr; gap: 20px; }
  .doctor-hero .dh-photo { max-width: 230px; }
  .doctor-hero .dh-name { font-size: 26px; }
}

/* 経歴などの年表は、年の列を狭くして読みやすくする */
dl.detail.timeline-list { grid-template-columns: 92px 1fr; }
@media (max-width: 560px) { dl.detail.timeline-list { grid-template-columns: 1fr; } }

/* ---- よくあるご質問（クリックで開閉） ---- */
.faq { margin: 6px 0 10px; }
.faq details {
  background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 16px 52px 16px 46px; font-weight: 700; font-size: 16px; line-height: 1.7;
  transition: background .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--c-primary-light); }
/* 左に Q、右に開閉の＋／− */
.faq summary::before {
  content: "Q"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-serif); font-size: 17px; color: var(--c-primary); font-weight: 600;
}
/* 閉じているときは＋、開いているときは− */
.faq summary::after {
  content: "＋"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  color: var(--c-primary); font-size: 17px; font-weight: 700; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { background: var(--c-primary-light); }
.faq details > p {
  margin: 0; padding: 4px 24px 20px 46px; font-size: 15px; line-height: 1.95; color: var(--c-text);
}
@media (max-width: 640px) {
  .faq summary { padding: 14px 44px 14px 40px; font-size: 15px; }
  .faq summary::before { left: 15px; }
  .faq details > p { padding: 4px 18px 18px 40px; font-size: 15px; }
}

/* ---- 研究会・関連リンク ---- */
.linkset { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 10px; }
.linkset a.linkcard {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: inherit;
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 18px 20px; transition: .16s; box-shadow: var(--shadow-soft);
}
.linkset a.linkcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c-primary); }
.linkset .lk-name { font-weight: 700; font-size: 16px; color: var(--c-primary-dark); display: flex; align-items: center; gap: 7px; }
.linkset .lk-name::after { content: "↗"; font-size: 13px; color: var(--c-muted); font-weight: 500; }
.linkset .lk-desc { font-size: 14px; color: var(--c-muted); line-height: 1.7; }
@media (max-width: 600px) { .linkset { grid-template-columns: 1fr; } }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 18px; }
.footer-links a { font-size: 14px; }

/* ---- ルート選択（ラジオカード） ---- */
.mode-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 4px; }
@media (max-width: 600px) { .mode-choice { grid-template-columns: 1fr; } }
.mode-choice label {
  display: block; cursor: pointer; border: 2px solid var(--c-border); border-radius: var(--radius);
  padding: 18px 20px; background: #fff; transition: .15s; font-weight: 500;
}
.mode-choice input { position: absolute; opacity: 0; }
.mode-choice label:hover { border-color: var(--c-primary-light); }
.mode-choice input:checked + .mc-body { }
.mode-choice label:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-light); box-shadow: 0 0 0 3px rgba(27,110,140,.12); }
.mode-choice .mc-t { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.mode-choice .mc-d { font-size: 14px; color: var(--c-muted); line-height: 1.6; }

/* オンライン希望のときだけ表示する候補選択 */
.online-only { display: none; }
.online-only.show { display: block; }

/* ---- カレンダー ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h2 { border: none; padding: 0; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { text-align: center; font-size: 13px; font-weight: 700; color: var(--c-muted); padding: 4px 0; }
.cal-grid .cell { min-height: 92px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; padding: 6px; font-size: 12px; }
.cal-grid .cell.empty { background: transparent; border: none; }
.cal-grid .cell .day { font-weight: 700; font-size: 13px; color: var(--c-muted); margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; }
.cal-grid .cell.today .day > span { color: var(--c-accent-dark); }
.cal-grid .cal-add { font-size: 11px; font-weight: 700; color: var(--c-primary-dark); background: var(--c-primary-light); border-radius: 6px; padding: 1px 6px; text-decoration: none; opacity: 0; transition: .1s; }
.cal-grid .cell:hover .cal-add { opacity: 1; }
@media (hover: none) { .cal-grid .cal-add { opacity: 1; } }
/* 予約・希望を表す丸（クリックで右ペインに詳細） */
.cal-dot {
  display: flex; align-items: center; gap: 4px; text-decoration: none; color: var(--c-text);
  font-size: 11px; line-height: 1.3; padding: 2px 4px; border-radius: 6px; margin-bottom: 2px;
  border: 1px solid transparent;
}
.cal-dot:hover { background: #f2f7f8; border-color: var(--c-border); }
.cal-dot.is-selected { background: var(--c-primary-light); border-color: var(--c-primary); }
.cal-dot .mk, .cal-legend2 .mk {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.14);
}
.cal-dot .tm { flex: none; font-variant-numeric: tabular-nums; color: var(--c-muted); }
.cal-dot .nm { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-green  .mk, .mk.st-green  { background: #1e9e63; }
.st-yellow .mk, .mk.st-yellow { background: #e8c11c; }
.st-orange .mk, .mk.st-orange { background: #e8862a; }
.st-red    .mk, .mk.st-red    { background: #d64545; }
.st-open   .mk, .mk.st-open   { background: #c8d0d4; }

/* 凡例 */
.cal-legend-box { border: 1px solid var(--c-border); background: #fff; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.cal-legend-box .clt { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.cal-legend2 { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--c-muted); }
.cal-legend2 li { display: flex; align-items: center; gap: 6px; }
.cal-legend2 b { color: var(--c-text); font-weight: 700; }

/* カレンダー＋詳細ペイン。カレンダー側を広めに取る。 */
.cal-split .split-list { max-width: none; flex: 1.5 1 0; }
.cal-split .split-detail { flex: 1 1 0; min-width: 330px; }
.cal-pane { max-height: calc(100vh - 150px); overflow: auto; }

/* 週表示 */
table.week-grid.cal-week td.cal-week-cell { height: 30px; vertical-align: top; padding: 1px 2px; text-align: left; }
table.week-grid.cal-week td.cal-week-cell.today { background: #f6fbfc; }

@media (max-width: 640px) {
  .cal-grid .cell { min-height: 66px; }
  .cal-dot { font-size: 10px; }
  .cal-dot .tm { display: none; }
}

/* ---- 週間一括作成グリッド ---- */
.week-grid-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: #fff; }
table.week-grid { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13px; }
table.week-grid th, table.week-grid td { border: 1px solid var(--c-border); text-align: center; padding: 0; }
table.week-grid th.time-col, table.week-grid td.time-col { width: 64px; font-size: 12px; color: var(--c-muted); font-weight: 600; white-space: nowrap; padding: 0 6px; background: #f7fafa; }
table.week-grid th.day-col { padding: 8px 4px; background: #f7fafa; }
table.week-grid th.day-col .dname { font-weight: 700; font-size: 13px; }
table.week-grid th.day-col .ddate { font-size: 11px; color: var(--c-muted); }
table.week-grid th.day-col.today { background: var(--c-primary-light); }
table.week-grid .row-toggle { font-size: 10px; color: var(--c-primary-dark); text-decoration: none; cursor: pointer; }
table.week-grid .col-toggle { display: block; font-size: 10px; color: var(--c-primary-dark); text-decoration: none; cursor: pointer; margin-top: 2px; }

.slot-cell { height: 30px; position: relative; }
.slot-cell label {
  display: flex; align-items: center; justify-content: center; height: 100%; cursor: pointer;
  transition: background .1s;
}
.slot-cell input[type=checkbox] { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.slot-cell input[type=checkbox]:checked + label,
.slot-cell label:has(input:checked) { background: var(--c-primary); }
.slot-cell.free label:hover { background: var(--c-primary-light); }
.slot-cell.occupied { background: #f1f3f4; cursor: not-allowed; }
.slot-cell.occupied .oc { font-size: 10px; color: var(--c-muted); text-decoration: none; }
.slot-cell.past { background: #fafafa; }

.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.week-nav h2 { border: none; padding: 0; margin: 0; }
.week-legend { display: flex; gap: 16px; margin: 10px 0 0; font-size: 13px; color: var(--c-muted); flex-wrap: wrap; }
.week-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.week-legend .lf::before { background: #fff; border: 1px solid var(--c-border); }
.week-legend .ls::before { background: var(--c-primary); }
.week-legend .lo::before { background: #f1f3f4; }
.week-legend .lc::before { background: #e0edff; }

/* ---- 詳細画面の日時ピッカー（週の枠表から30分を選ぶ） ---- */
table.week-grid.pick-grid { min-width: 460px; font-size: 12px; }
table.week-grid.pick-grid th.time-col, table.week-grid.pick-grid td.time-col { width: 52px; }
.pick-cell { height: 28px; padding: 0; }
.pick-cell .pick-btn {
  display: block; width: 100%; height: 28px; border: 0; padding: 0; margin: 0;
  background: transparent; cursor: pointer; font-size: 10px; font-weight: 700;
  color: var(--c-primary-dark); line-height: 28px;
}
.pick-cell .pick-btn:hover { background: var(--c-primary); color: #fff; }
.pick-cell.has-slot { background: var(--c-success-bg); }
.pick-cell.cand { box-shadow: inset 0 0 0 2px var(--c-accent); }
.pick-cell.taken { background: #e0edff; }
.pick-cell.taken a { font-size: 10px; color: #1d4ed8; text-decoration: none; }
.pick-cell.past { background: #fafafa; }
.pick-legend .lf::before { background: #fff; border: 1px solid var(--c-border); }
.pick-legend .lo::before { background: var(--c-success-bg); }
.pick-legend .lc::before { background: #fff; border: 2px solid var(--c-accent); }
.pick-legend .lt::before { background: #e0edff; }

/* ---- 区切り・ユーティリティ ---- */
hr.sep { border: none; border-top: 1px solid var(--c-border); margin: 32px 0; }
.text-center { text-align: center; }
.mb0 { margin-bottom: 0; }
.cta-wrap { text-align: center; background: var(--c-accent-light); border-radius: var(--radius); padding: 30px 24px; margin: 28px 0 8px; }
.cta-wrap .sub { font-size: 15px; color: var(--c-muted); margin-top: 12px; }

/* ---- 管理レイアウト ---- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 230px; flex: none; background: #143f4d; color: #cfe6ea; padding: 18px 0; }
.admin-side .brand-a { padding: 0 18px 16px; font-weight: 700; color: #fff; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-side nav { display: flex; flex-direction: column; padding: 10px 10px; gap: 2px; }
.admin-side nav a { color: #cfe6ea; text-decoration: none; padding: 11px 15px; border-radius: 10px; font-size: 15px; }
.admin-side nav a:hover, .admin-side nav a.active { background: rgba(255,255,255,.13); color: #fff; }
.admin-main { flex: 1; min-width: 0; background: var(--c-bg); }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--c-border); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar .who { font-size: 14px; color: var(--c-muted); }
.admin-content { padding: 30px 36px; max-width: 1680px; }
@media (max-width: 1400px) { .admin-content { padding: 26px 24px; } }
.admin-content h1 { font-size: 24px; }

/* 一覧＋詳細の分割ビュー（右ペインは iframe） */
.split-view { display: flex; gap: 18px; align-items: flex-start; }
.split-list { flex: 1 1 0; min-width: 0; max-width: 560px; }
.split-detail { flex: 1.6 1 0; min-width: 0; position: sticky; top: 20px; }
.detail-frame {
  width: 100%; height: calc(100vh - 150px); min-height: 480px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: #fff;
}
.split-list .tasks { max-height: calc(100vh - 260px); overflow-y: auto; }
/* 表形式の一覧を左ペインに置く場合は、列が読めるよう左を広めに取る */
.split-list.list-wide { max-width: 840px; flex: 1.3 1 0; }
.split-list.list-wide + .split-detail { flex: 1 1 0; min-width: 360px; }

/* 申込・予約一覧の表 */
.list-table-wrap { max-height: calc(100vh - 300px); overflow: auto; }
table.data.book-table { font-size: 13px; min-width: 660px; }
table.data.book-table th, table.data.book-table td { padding: 8px 10px; }
table.data.book-table thead th { position: sticky; top: 0; z-index: 1; }
.book-row { cursor: pointer; }
.book-row.is-pending td { background: #fffdf7; }
.book-row:hover td { background: #f7fbfc; }
.book-row.is-selected td { background: var(--c-primary-light) !important; }
.book-table td.st { font-weight: 700; }
.book-table td.nm a { font-weight: 700; }
.book-table td.dt { white-space: nowrap; }
.book-table td.acts { white-space: nowrap; }
.book-table td.acts form { margin: 0; }
@media (max-width: 900px) {
  .split-list.list-wide { max-width: none; }
  .list-table-wrap { max-height: none; }
  .split-view { flex-direction: column; }
  .split-list { max-width: none; width: 100%; }
  .split-detail { position: static; width: 100%; }
  .detail-frame { height: 70vh; }
}

/* 申込内容の「修正する」開閉（<details> をボタン風に） */
.edit-toggle { margin-top: 18px; border-top: 1px solid var(--c-border); padding-top: 16px; }
.edit-toggle summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--c-border);
  background: #fff; color: var(--c-primary-dark); font-weight: 700; font-size: 14px;
}
.edit-toggle summary::-webkit-details-marker { display: none; }
.edit-toggle summary::before { content: "✎"; font-size: 13px; }
.edit-toggle summary:hover { background: var(--c-primary-light); }
.edit-toggle[open] summary { margin-bottom: 6px; }

/* 候補枠に紐づく「他の希望者」の直接表示 */
.other-seekers { background: var(--c-warn-bg); border: 1px solid var(--c-warn-border); border-radius: var(--radius-sm); padding: 10px 12px; }
.other-seekers .os-label { font-size: 12px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.other-seekers .os-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; flex-wrap: wrap; }
.other-seekers .os-row + .os-row { border-top: 1px dashed #f0d9b5; }
.other-seekers .os-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }

/* ---- ページ編集（管理画面：文章・画像の自己編集） ---- */
.page-edit-form { max-width: 780px; }
.page-edit-section {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px;
}
.page-edit-section h2 { margin: 0 0 16px; font-size: 17px; }
.page-edit-field { margin-bottom: 20px; }
.page-edit-field:last-child { margin-bottom: 0; }
.page-edit-field > label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.page-edit-field input[type=text] {
  width: 100%; padding: 11px 13px; border: 2px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
}
.page-edit-field input[type=text]:focus { outline: none; border-color: var(--c-primary); }

/* リッチテキスト編集（contenteditable + シンプルなツールバー） */
.rte { border: 2px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; }
.rte:focus-within { border-color: var(--c-primary); }
.rte-toolbar { display: flex; gap: 4px; padding: 6px; background: var(--c-bg-tint); border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.rte-toolbar button {
  border: 1px solid transparent; background: none; border-radius: 6px; padding: 5px 10px;
  font-size: 13px; cursor: pointer; color: var(--c-text); font-family: inherit;
}
.rte-toolbar button:hover { background: #fff; border-color: var(--c-border); }
.rte-editable { padding: 14px 16px; font-size: 15px; line-height: 1.85; min-height: 90px; }
.rte-editable:focus { outline: none; }
.rte-editable p { margin: 0 0 12px; }
.rte-editable ul { margin: 0; padding-left: 1.3em; }
.rte-editable li { margin-bottom: 6px; }
.rte-editable[data-empty="true"]::before { content: attr(data-placeholder); color: var(--c-muted); }

/* 画像アップロード */
.img-field-preview {
  display: block; max-width: 320px; width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); margin-bottom: 10px; background: #111;
}
.img-field input[type=file] { font-size: 14px; }

/* 繰り返し項目（FAQ・経歴・リンク集など） */
.list-field .list-row {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; background: var(--c-bg-tint);
}
.list-field .list-row-body { flex: 1 1 auto; min-width: 0; }
.list-field .list-sub + .list-sub { margin-top: 8px; }
.list-field .list-sub > label {
  display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 4px;
}
.list-field .list-sub input[type=text],
.list-field .list-sub textarea {
  width: 100%; padding: 8px 10px; border: 2px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; line-height: 1.7;
  background: #fff;
}
.list-field .list-sub input[type=text]:focus,
.list-field .list-sub textarea:focus { outline: none; border-color: var(--c-primary); }
.list-field .list-row-ops { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.list-field .list-row-ops button {
  border: 1px solid var(--c-border); background: #fff; border-radius: 6px;
  padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--c-text); font-family: inherit;
}
.list-field .list-row-ops button:hover { border-color: var(--c-primary); }
.list-field .list-row-ops .list-del { color: var(--c-danger, #b3261e); }

/* 変更履歴 */
.rev-history { margin-top: 10px; }
.rev-history summary {
  cursor: pointer; list-style: none; font-size: 13px; color: var(--c-primary-dark); font-weight: 600;
}
.rev-history summary::-webkit-details-marker { display: none; }
.rev-history summary::before { content: "🕐 "; }
.rev-history ul { list-style: none; padding: 0; margin: 8px 0 0; }
.rev-history li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; padding: 6px 0; border-top: 1px dashed var(--c-border);
}
.rev-history .rev-meta { color: var(--c-muted); }

.page-edit-save-bar {
  position: sticky; bottom: 0; background: var(--c-bg); border-top: 1px solid var(--c-border);
  padding: 14px 0; margin-top: 6px; display: flex; align-items: center; gap: 14px; z-index: 5;
}

/* iframe内（右ペイン）の軽量レイアウト */
body.frame-body { background: #fff; }
.frame-content { padding: 18px 20px; max-width: 720px; }
.frame-content h1 { font-size: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 20px; }
.stat .n { font-size: 32px; font-weight: 700; color: var(--c-primary-dark); line-height: 1.1; }
.stat .l { font-size: 14px; color: var(--c-muted); margin-top: 6px; }
.stat.alert .n { color: var(--c-error); }
a.stat { display: block; text-decoration: none; transition: .12s; }
a.stat:hover { border-color: var(--c-primary); box-shadow: var(--shadow-soft); }

/* TODOバッジ（各申込の「今やること」表示） */
.todo-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.todo-badge.todo { background: #e0edff; color: #1d4ed8; }
.todo-badge.warn { background: var(--c-error-bg); color: var(--c-error); }
.todo-badge.done { background: var(--c-success-bg); color: var(--c-success); }
.todo-badge.muted { background: #f1f3f4; color: #6b7280; }

/* 詳細画面のTODOバナー */
.todo-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; }
.todo-banner.b-todo { background: var(--c-primary-light); border: 1px solid #b6dde2; }
.todo-banner.b-warn { background: var(--c-error-bg); border: 1px solid #f3b4af; }
.todo-banner.b-done { background: var(--c-success-bg); border: 1px solid #b6e2c6; }
.todo-banner.b-muted { background: #f1f3f4; border: 1px solid var(--c-border); }
.todo-banner .tb-label { font-weight: 700; font-size: 16px; }
.todo-banner form { margin: 0; }

/* タスク一覧（板谷先生のToDo） */
.tasks { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.task { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.task:last-child { border-bottom: none; }
.task.is-pending { background: #fffdf7; }
.task .ti { flex: 1; min-width: 220px; }
.task .ti .nm { font-weight: 700; font-size: 16px; }
.task .ti .sub { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.task .badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.task .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task .acts form { margin: 0; }
.btn.xs { padding: 7px 13px; font-size: 13px; border-radius: 8px; box-shadow: none; }
.task-empty { padding: 28px; text-align: center; color: var(--c-muted); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 20px; background: #fff; padding: 18px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.filters .field { margin: 0; }
.filters .field label { font-size: 13px; }
.filters input, .filters select { padding: 9px 11px; font-size: 15px; }

@media (max-width: 720px) {
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
}
