/* 【新規開業支援】— 病院の未来のための時間
   配色はアプリのアイコン（木漏れ日の緑・金・クリーム・四つ葉）から */
:root {
  --forest: #2d5b3f;
  --forest-d: #1f4430;
  --leaf: #6a9f5b;
  --leaf-l: #e8f2df;
  --gold: #b8913a;
  --gold-d: #96742a;
  --gold-l: #f7eed6;
  --cream: #fbf8ef;
  --card: rgba(255, 255, 255, .84);
  --text: #2a3a2f;
  --muted: #6f7d72;
  --line: rgba(70, 100, 70, .16);
  --red: #b3473a;
  --red-l: #fbe6e1;
  --amber-l: #fbf0d2;
  --radius: 20px;
  --shadow: 0 8px 28px rgba(55, 85, 45, .10), 0 1px 3px rgba(55, 85, 45, .06);
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--cream);
  min-height: 100vh;
}
/* iPad の Safari は background-attachment: fixed が効かないため、固定の疑似要素で背景を敷く */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: url("../img/bg.jpg") center / cover no-repeat, var(--cream);
}

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.35; color: var(--forest); }
h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 10px; height: 10px; border-radius: 50% 0 50% 0; background: linear-gradient(135deg, var(--leaf), var(--gold)); flex: 0 0 auto; }
h3 { font-size: 1.04rem; }
.serif { font-family: var(--serif); letter-spacing: .04em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 18px 22px 48px; }
.narrow { max-width: 660px; }
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; margin: 0 auto; }
.center-text { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt { margin-top: 20px; }

/* ---- ヘッダー ---- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(255, 253, 246, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(184, 145, 58, .35);
  box-shadow: 0 2px 14px rgba(55, 85, 45, .06);
}
.bar-title { font-family: var(--serif); font-size: 1.12rem; margin: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; color: var(--forest-d); }
.bar-left { display: flex; align-items: center; }
.bar-right { display: flex; justify-content: flex-end; gap: 6px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--forest); }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.bar .btn.ghost { color: var(--forest); border-color: rgba(45, 91, 63, .25); background: rgba(255, 255, 255, .5); }

/* ---- ボタン ---- */
.btn {
  appearance: none; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); color: var(--text);
  border-radius: 12px; padding: 10px 18px; font-size: 1rem; cursor: pointer; min-height: 44px;
  transition: transform .08s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--forest) 0%, #3f7a52 60%, var(--leaf) 100%);
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(45, 91, 63, .28);
}
.btn.gold {
  background: linear-gradient(135deg, #c9a24a, var(--gold-d));
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(150, 116, 42, .3);
}
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .45; }
.link { appearance: none; border: 0; background: none; color: var(--forest); text-decoration: underline; text-decoration-color: rgba(184, 145, 58, .6); text-underline-offset: 3px; font-size: inherit; padding: 0; cursor: pointer; text-align: left; }

/* ---- カード ---- */
.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card.empty { color: var(--muted); text-align: center; padding: 34px 20px; }
.card.danger { border-color: #ebc3bc; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.row-between h2, .row-between h3 { margin: 0; }
.notice { background: rgba(251, 240, 210, .92); border: 1px solid #ecd79c; border-radius: 14px; padding: 10px 16px; margin-bottom: 16px; }
.warn { background: var(--amber-l); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: .92rem; }
.warn ul { margin: 6px 0 0; padding-left: 1.2em; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.plain li:last-child { border-bottom: 0; }

/* ---- ホームのヒーロー ---- */
.hero { display: flex; align-items: center; gap: 22px; padding: 26px 28px; margin: 6px 0 20px; border-radius: 26px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .78), rgba(255, 250, 235, .62));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .8); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 180, .65), rgba(255, 236, 180, 0) 70%); pointer-events: none; }
.hero img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); flex: 0 0 auto; }
.hero-title { font-family: var(--serif); font-size: 1.9rem; color: var(--forest-d); margin: 0; letter-spacing: .06em; }
.hero-sub { margin: 4px 0 0; color: var(--muted); }
.hero-date { margin-top: 8px; font-size: .88rem; color: var(--gold-d); font-weight: 600; letter-spacing: .05em; }
@media (max-width: 600px) { .hero { flex-direction: column; text-align: center; } .hero-title { font-size: 1.5rem; } }

/* ---- 病院一覧 ---- */
.hlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.hcard {
  position: relative; text-align: left; background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--radius); padding: 18px 18px 16px 22px; cursor: pointer;
  font-size: 1rem; color: var(--text); min-height: 128px; box-shadow: var(--shadow); overflow: hidden;
}
.hcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--leaf), var(--gold)); }
.hcard:active { transform: scale(.99); }
.hcard strong { font-family: var(--serif); font-size: 1.15rem; color: var(--forest-d); }
.hcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.countdown { display: inline-block; margin-top: 8px; font-size: .85rem; font-weight: 700; color: var(--gold-d); background: var(--gold-l); padding: 3px 12px; border-radius: 99px; }

.tag { font-size: .76rem; background: var(--leaf-l); color: var(--forest); padding: 2px 10px; border-radius: 99px; white-space: nowrap; font-weight: 600; }
.tag-ok { background: #e3eefc; color: #2b5794; }
.tag-off { background: #eeeeea; color: #7c7c74; }
.tag-late { background: var(--red-l); color: var(--red); }
.tag-soon { background: var(--amber-l); color: #8a5a00; }

/* ---- 病院ページのヒーロー ---- */
.hhero { padding: 22px 24px; margin: 4px 0 14px; border-radius: 24px; background: linear-gradient(115deg, rgba(255, 255, 255, .82), rgba(247, 238, 214, .7));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .8); }
.hhero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.hhero h1 { font-family: var(--serif); font-size: 1.8rem; margin: 0; color: var(--forest-d); letter-spacing: .05em; }
.big-count { text-align: right; }
.big-count .label { font-size: .8rem; color: var(--muted); }
.big-count .num { font-family: var(--serif); font-size: 2.3rem; line-height: 1; color: var(--gold-d); font-weight: 700; }
.big-count .num small { font-size: 1rem; margin-left: 2px; }
.future { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; position: relative; }
.fcard { position: relative; background: rgba(255, 255, 255, .88); border-radius: 16px; padding: 14px 14px 12px; border: 1px solid rgba(184, 145, 58, .25); }
.fcard .yr { display: inline-block; font-family: var(--serif); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--leaf), var(--gold)); padding: 2px 12px; border-radius: 99px; font-size: .9rem; margin-bottom: 6px; }
.fcard p { margin: 0; font-size: .95rem; }
.fcard p.empty { color: var(--muted); font-size: .85rem; }
.future-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
@media (max-width: 700px) { .future { grid-template-columns: 1fr; } }

/* ---- タブ ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 6px; margin-bottom: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.tab { appearance: none; border: 0; background: none; padding: 10px 16px; font-size: .98rem; color: var(--muted); border-radius: 12px; white-space: nowrap; cursor: pointer; min-height: 46px; }
.tab.on { color: #fff; background: linear-gradient(135deg, var(--forest), var(--leaf)); font-weight: 600; box-shadow: 0 3px 10px rgba(45, 91, 63, .25); }
.tab small { display: block; font-size: .62rem; line-height: 1; opacity: .8; }

/* ---- フォーム ---- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.field em { font-style: normal; color: var(--red); font-size: .75rem; }
.field small { color: var(--muted); }
input[type=text], input[type=password], input[type=date], input[type=file], select, textarea {
  width: 100%; font-size: 1rem; padding: 11px 13px; border: 1px solid rgba(70, 100, 70, .22); border-radius: 12px;
  background: rgba(255, 255, 255, .95); color: var(--text); font-family: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: transparent; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.error { color: var(--red); min-height: 1.4em; margin: 6px 0; }

dl.kv { display: grid; grid-template-columns: 12em 1fr; gap: 8px 16px; margin: 0 0 14px; }
dl.kv dt { color: var(--muted); font-size: .9rem; }
dl.kv dd { margin: 0; }
dl.kv.tight { grid-template-columns: 10em 1fr; }
@media (max-width: 700px) { dl.kv, dl.kv.tight { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 8px; } }

table.log { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.log th, table.log td { text-align: left; padding: 9px 8px; border-bottom: 1px dashed var(--line); vertical-align: top; }
table.log th { color: var(--muted); font-weight: 500; }

/* ---- ロック画面・初回設定 ---- */
.lockbrand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lockbrand img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(55, 85, 45, .2); margin-bottom: 14px; }
.lockbrand .title { font-family: var(--serif); color: var(--forest-d); font-size: 1.6rem; margin: 0; letter-spacing: .08em; }
.lockbrand .concept { font-family: var(--serif); color: var(--gold-d); margin: 4px 0 0; letter-spacing: .12em; }
.sub { color: var(--muted); margin: 14px 0 0; }
.dots { display: flex; gap: 16px; margin: 18px 0 6px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold); display: block; }
.dots i.on { background: var(--gold); }
.shake { animation: shake .35s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 84px); gap: 16px; margin-top: 10px; }
.pad.disabled { opacity: .35; pointer-events: none; }
.key { width: 84px; height: 84px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 1.6rem; cursor: pointer; color: var(--forest-d); box-shadow: 0 3px 12px rgba(55, 85, 45, .1); }
.key:active { background: var(--leaf-l); }

.toast { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--forest-d); color: #fff; padding: 10px 20px; border-radius: 99px; z-index: 100; font-size: .95rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
pre.err { white-space: pre-wrap; color: var(--red); }
details summary { cursor: pointer; color: var(--muted); }

/* ---- 面談・約束・訪問前の確認 ---- */
.mcard { display: block; width: 100%; text-align: left; background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .75); border-radius: 18px; padding: 15px 18px; margin-bottom: 12px; cursor: pointer; font-size: 1rem; color: var(--text); box-shadow: var(--shadow); }
.mcard strong { font-family: var(--serif); color: var(--forest-d); font-size: 1.05rem; }
.clip { margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meeting-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; }
.field.inline { margin-bottom: 0; }
.field.inline .check { display: inline-flex; margin-right: 14px; }
.stepnav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 80px; padding: 9px 8px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .8); color: var(--muted); font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(55, 85, 45, .08); }
.chip span { font-size: .68rem; font-weight: 400; white-space: nowrap; max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.chip.done { background: linear-gradient(135deg, #f6ecd0, #efe0b5); color: var(--gold-d); border-color: #e6d29d; }
.chip.on { outline: 3px solid var(--leaf); outline-offset: -1px; color: var(--forest); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold-d); background: var(--gold-l); padding: 8px 16px; border-radius: 99px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--gold); }
details.qs { background: rgba(232, 242, 223, .7); border-radius: 12px; padding: 9px 14px; margin-bottom: 14px; }
details.qs ul { margin: 6px 0 0; padding-left: 1.2em; }
.prow { display: grid; grid-template-columns: 1fr 170px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 700px) { .prow { grid-template-columns: 1fr; } }
.stepbtns { margin-top: 4px; }
.danger-text { color: var(--red); }
li.promise .check { margin: 0; }
li.promise.is-done span { text-decoration: line-through; color: var(--muted); }
.brief-title { font-family: var(--serif); font-size: 1.6rem; margin: 8px 0 0; color: var(--forest-d); }
.doc-brief { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.doc-brief:last-child { border-bottom: 0; }
details.card summary { margin-bottom: 0; }

/* ---- 段階3：エリア分析 ---- */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; }
.checks .check { margin: 4px 0; font-size: .95rem; }
.okbox { background: var(--leaf-l); border-radius: 12px; padding: 10px 14px; margin: 12px 0; color: var(--forest); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.stat { background: rgba(255, 255, 255, .9); border: 1px solid rgba(184, 145, 58, .22); border-radius: 16px; padding: 14px; position: relative; }
.stat.verified { border-color: rgba(106, 159, 91, .55); }
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-val { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--forest-d); line-height: 1.3; }
.stat-val small { font-size: .85rem; font-weight: 400; color: var(--muted); font-family: inherit; }
.src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: .8rem; }
.src a { color: var(--forest); }
.vbtn { appearance: none; border: 1px solid #e6c98a; background: var(--amber-l); color: #8a5a00; border-radius: 99px; padding: 3px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; min-height: 30px; }
.vbtn.on { border-color: #b9d4a8; background: var(--leaf-l); color: var(--forest); }
.vbtn.mini { min-height: 24px; padding: 1px 8px; font-size: .72rem; }
.ok-mark { color: var(--leaf); font-weight: 700; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
table.cmp th, table.cmp td { padding: 10px; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
table.cmp thead th { color: var(--forest); font-family: var(--serif); }
table.cmp tbody th { color: var(--muted); font-weight: 500; width: 26%; }
table.cmp .me { background: rgba(247, 238, 214, .55); }
table.cmp td { font-weight: 600; }
table.cmp td .small { font-weight: 400; }
table.cmp a { color: var(--forest); }

/* ---- 段階4：資料（PowerPoint） ---- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.theme { appearance: none; text-align: left; border: 2px solid transparent; background: rgba(255, 255, 255, .9); border-radius: 16px; padding: 8px; cursor: pointer; box-shadow: 0 2px 10px rgba(55, 85, 45, .08); font-size: .95rem; color: var(--text); }
.theme img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 6px; }
.theme strong { display: block; font-family: var(--serif); color: var(--forest-d); letter-spacing: .08em; }
.theme span { font-size: .78rem; color: var(--muted); }
.theme.on { border-color: var(--gold); box-shadow: 0 4px 16px rgba(150, 116, 42, .25); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.slidegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.slidebox { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); cursor: pointer; font-size: .92rem; }
.slidebox.on { background: var(--gold-l); border-color: #e2cc8f; }
.slidebox input { width: 20px; height: 20px; accent-color: var(--gold); }
.slidebox .stitle { flex: 1; }
.sno { font-family: var(--serif); font-weight: 700; color: var(--gold-d); min-width: 1.6em; }
.preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pv { background: rgba(255, 255, 255, .92); border-radius: 14px; padding: 12px 14px; border: 1px solid rgba(184, 145, 58, .25); font-size: .9rem; }
.pv p { margin: 4px 0; }
.pv-head { font-family: var(--serif); font-weight: 700; color: var(--forest-d); margin-bottom: 4px; display: flex; gap: 8px; }
.btn.big { min-height: 56px; font-size: 1.1rem; margin-top: 4px; }
.deckcard { display: flex; align-items: center; gap: 14px; cursor: default; }
.deckcard img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.deckcard .grow { flex: 1; }
.bio-btn { margin-top: 22px; min-width: 260px; min-height: 52px; font-size: 1.05rem; }

/* ---- 地図 ---- */
.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.maps figure { margin: 0; }
.maps img { width: 100%; border-radius: 14px; display: block; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.maps figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; text-align: center; }
.pv-map { width: 100%; border-radius: 10px; margin: 6px 0; }

/* ---- 資料用の文章（承認） ---- */
.apvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.apv { background: rgba(255, 255, 255, .92); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #e3a59b; }
.apv.ok { border-left-color: var(--leaf); }
.apv.stale { border-left-color: var(--gold); }
.apv-head { font-weight: 600; color: var(--forest-d); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .95rem; }
.apv details.qs { margin-bottom: 8px; font-size: .88rem; }
.apv details.qs p { margin: 6px 0 0; color: var(--muted); }
.apv-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.row-gap { display: flex; gap: 8px; margin: 6px 0 10px; }

/* ---- 指示文のコピー枠（ChatGPT のコードブロック風） ---- */
.codebox { margin: 14px 0 12px; border-radius: 14px; overflow: hidden; border: 1px solid #2b3a31; background: #1f2a24; }
.codebox-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 6px 14px; background: #2b3a31; color: #cfd8d2; font-size: .82rem; }
.codebox-copy { appearance: none; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 8px; padding: 6px 12px; font-size: .85rem; cursor: pointer; min-height: 34px; }
.codebox pre { margin: 0; padding: 12px 14px; max-height: 260px; overflow: auto; color: #e8efe9; font-size: .8rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; -webkit-overflow-scrolling: touch; }
details.cond { margin: 8px 0 12px; }
details.cond summary { padding: 8px 0; color: var(--forest); font-weight: 600; }
details.cond[open] summary { margin-bottom: 8px; }

/* ---- 長期の推移（グラフ） ---- */
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chartcard { background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.chart-head h3 { margin: 0; font-size: 1rem; }
.chart-kpi { text-align: right; display: flex; flex-direction: column; line-height: 1.3; }
.chart-kpi strong { font-family: var(--serif); font-size: 1.35rem; color: var(--forest-d); }
.chart-kpi span { font-size: .78rem; }
.chart { position: relative; touch-action: pan-y; }
.chart svg { width: 100%; height: auto; display: block; }
.ch-grid { stroke: #e7ebe6; stroke-width: 1; }
.ch-axis { stroke: #cfd6cf; stroke-width: 1; }
.ch-tick { font-size: 11px; fill: #6f7d72; }
.ch-end { font-size: 12px; font-weight: 700; fill: #2a3a2f; }
.ch-cross { stroke: #9aa79c; stroke-width: 1; }
.ch-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #1f2a24; color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .8rem; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.ch-tip strong { display: block; font-size: .78rem; opacity: .85; }
.ch-tip .sw, .ch-legend .sw { vertical-align: middle; margin-right: 4px; }
.ch-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text); margin: 4px 0 2px; }
.chartcard a, .src a { color: var(--forest); }
.replay { appearance: none; border: 1px solid var(--line); background: rgba(255, 255, 255, .8); color: var(--forest); border-radius: 99px; font-size: .7rem; padding: 2px 9px; margin-left: 6px; cursor: pointer; vertical-align: middle; min-height: 26px; }

/* ---- 街の特徴・行事・住民像 ---- */
.profile { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pf { background: rgba(255, 255, 255, .92); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.pf h3 { margin: 0 0 4px; font-size: .95rem; }
.pf p { margin: 0 0 6px; font-size: .92rem; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev { display: flex; gap: 12px; background: rgba(255, 255, 255, .92); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.ev-icon { font-size: 1.6rem; line-height: 1; }
.ev-body { flex: 1; }
.ev-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev-rel { margin-top: 4px; color: var(--forest); }
.tag-hypo { background: #efe7fb; color: #5a3d8a; }
.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.persona { background: rgba(255, 255, 255, .94); border-radius: 16px; padding: 14px 16px; border: 1px dashed #c9b6e6; }
.ps-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ps-head strong { font-family: var(--serif); color: var(--forest-d); font-size: 1.05rem; }
.ps-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.persona p { margin: 6px 0; font-size: .92rem; }
.att { font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.att-price { background: #e3eefc; color: #2b5794; }
.att-value { background: var(--leaf-l); color: var(--forest); }
.att-trust { background: var(--gold-l); color: var(--gold-d); }
.ps-ev { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.evchip { font-size: .75rem; background: #f1f1ec; color: #555; border-radius: 99px; padding: 2px 8px; }
.evchip.ok { background: var(--leaf-l); color: var(--forest); }
.ch-tick.em { font-weight: 700; fill: #1f4430; }
.ch-end.dim { fill: #6f7d72; font-weight: 500; }
.chartcard.meters { margin-bottom: 12px; max-width: 640px; }
.ps-src { margin-top: 8px; line-height: 1.6; } .chart-src { margin: 6px 0 0; line-height: 1.6; } .chart-src a, .ps-src a { color: var(--forest); }
