/* 見た目は「配車プランナー UIプロトタイプ」に合わせている */
:root { font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif; color: #18241d; background: #f7faf8; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.app { max-width: 830px; margin: 0 auto; padding: 28px 16px 60px; }
.top, .flex, .section-heading, .actions, .member, .stop, .panel-head { display: flex; align-items: center; gap: 12px; }
.top, .section-heading, .stop, .panel-head { justify-content: space-between; }
.panel-head { align-items: flex-start; }
.flex { gap: 8px; }
.flex.wrap { flex-wrap: wrap; }
.top { margin-bottom: 25px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { display: grid; place-items: center; width: 46px; height: 46px; background: #166534; color: #fff; font-size: 24px; border-radius: 14px; flex-shrink: 0; }
.title { font-size: 19px; font-weight: 800; }
.muted, .subtitle, .hint { color: #67756c; }
.muted { font-size: 13px; }

/* ステップ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; }
.step { appearance: none; border: 0; background: none; text-align: left; color: #75847a; cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.track { height: 5px; background: #d9e2dc; border-radius: 20px; margin-bottom: 9px; }
.step.active { color: #166534; font-weight: 800; }
.step.active .track, .step.done .track { background: #16a34a; }

.panel { background: #fff; border: 1px solid #e0e8e2; border-radius: 18px; padding: 22px; margin-bottom: 14px; box-shadow: 0 3px 14px #19351c06; }
h1 { font-size: 23px; letter-spacing: -.03em; margin: 0 0 5px; }
.subtitle { font-size: 14px; line-height: 1.65; margin: 0 0 23px; }
.field { margin: 0 0 17px; min-width: 0; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
input, select, textarea { display: block; width: 100%; min-width: 0; color: #18241d; background: #fff; border: 1px solid #d3ded5; border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #6cc58c; outline-offset: 1px; }
select:disabled { color: #9aa59d; background: #f2f6f3; }
.two { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }

/* ボタン */
.btn { appearance: none; border: 1px solid #d3ded5; background: #fff; border-radius: 10px; padding: 11px 15px; color: #18241d; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn.primary { background: #166534; color: #fff; border-color: #166534; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .step:focus-visible, .mini:focus-visible, .choice:focus-visible { outline: 3px solid #86efac; outline-offset: 2px; }
.actions { margin-top: 20px; }
.actions .primary { flex: 1; }
.mini { border: 1px solid #d3ded5; border-radius: 8px; background: #fff; cursor: pointer; padding: 7px 9px; font: inherit; font-size: 13px; color: #18241d; white-space: nowrap; }
.mini.del { color: #b91c1c; }
.choice { border: 1px solid #d3ded5; border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; background: #fff; font: inherit; font-weight: 700; color: #18241d; }
.choice.selected { background: #e7f8ec; border: 2px solid #16a34a; padding: 13px; }
.small { font-size: 12px; font-weight: 400; color: #67756c; }
.chip { font-size: 12px; font-weight: 700; background: #edf3ee; padding: 5px 10px; border-radius: 30px; white-space: nowrap; }

/* 入力形式のラジオボタン・確認表示 */
.m-kind { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 7px 0 0; font-size: 13px; }
.m-kind label { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; cursor: pointer; white-space: nowrap; }
.m-kind input { width: auto; margin: 0; }
.addr { font-size: 12px; color: #67756c; margin-top: 4px; }
.addr.ng, .error { color: #b91c1c; }
.error { font-size: 13px; white-space: pre-wrap; }
#destSearchBox { margin: 9px 0 2px; }
#destSearchBox .hint { display: block; margin: 4px 0 0; }
.pick { display: block; width: 100%; margin: 6px 0; padding: 9px 12px; text-align: left; font: inherit; font-size: 14px; font-weight: 700; color: #18241d; background: #fff; border: 1px solid #d3ded5; border-radius: 10px; cursor: pointer; }
.pick:hover { background: #e7f8ec; }
.pick small { display: block; color: #67756c; font-size: 12px; font-weight: 400; }

/* メンバー */
.section-heading { margin-bottom: 14px; }
.member { padding: 13px; border: 1px solid #e0e8e2; border-radius: 12px; margin-bottom: 9px; }
.avatar { display: grid; place-items: center; border-radius: 50%; background: #edf3ee; width: 42px; height: 42px; flex-shrink: 0; font-weight: 800; }
.grow { flex: 1; min-width: 0; }
.name { font-weight: 800; overflow-wrap: anywhere; }
.member .muted { overflow-wrap: anywhere; }
.pill { display: inline-block; white-space: nowrap; font-size: 11px; background: #eef3ef; border-radius: 5px; padding: 3px 6px; margin: 4px 4px 0 0; }
.pill.driver { background: #dbeafe; color: #1e40af; }
.member-btns { display: flex; gap: 6px; flex-shrink: 0; }
.empty { border: 1px dashed #cbd7ce; text-align: center; padding: 25px; border-radius: 12px; color: #67756c; margin-bottom: 9px; }
.checkrow { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.checkrow input { width: auto; }
.checkrow label { margin: 0; font-weight: 500; }
details { border-top: 1px solid #e0e8e2; padding-top: 14px; margin-top: 15px; }
summary { font-size: 13px; font-weight: 750; cursor: pointer; }
.hint { font-size: 12px; line-height: 1.7; }
#bulkMsg { white-space: pre-wrap; margin-top: 4px; }
#bulkMsg.ng { color: #b91c1c; }
textarea::placeholder, input::placeholder { color: #9aa59d; }

/* 結果 */
.stat { background: #f2f6f3; border-radius: 12px; text-align: center; padding: 12px 6px; }
.stat span { display: block; font-size: 11px; color: #67756c; }
.stat strong { display: block; font-size: 22px; margin-top: 4px; }
.stat small { display: block; font-size: 11px; color: #67756c; margin-top: 2px; }
.warn { color: #9a5b00; font-size: 12px; line-height: 1.7; margin: 0 0 12px; }
.route { border: 1px solid #e0e8e2; border-radius: 13px; padding: 17px; margin-bottom: 12px; }
.timeline { margin: 19px 0 3px; padding-left: 13px; }
.stop { position: relative; align-items: flex-start; padding: 0 0 22px 22px; border-left: 2px solid #dce8df; }
.stop:last-child { border-color: transparent; padding-bottom: 0; }
.stop:before { content: ""; position: absolute; left: -7px; top: 2px; border: 3px solid #16a34a; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.stop-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.maps { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: #166534; }

#copyDialog { border: none; border-radius: 14px; padding: 18px 20px; max-width: 360px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#copyDialog p { margin: 0 0 12px; font-size: 14px; }
.dlg-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.footnote { font-size: 12px; color: #64756b; line-height: 1.7; }
.footnote a { color: #166534; }

@media (max-width: 520px) {
  .app { padding: 18px 12px 40px; }
  .panel { padding: 15px; }
  h1 { font-size: 21px; }
  .top .title { font-size: 16px; }
  .two { gap: 9px; }
  .member { gap: 8px; padding: 11px; }
  .mini { padding: 7px; }
  .stat strong { font-size: 19px; }
}
