/* 買取業者への一斉メール。色・大きさ・並びは フミの見本（mihon_kaitori の HTML 4 枚の style）をそのまま写したもの。
   字体は見本と同じ Noto Sans JP（Windows 11 に入っている。外の CDN からは読まない）。 */
body { margin: 0; font-family: 'Noto Sans JP', system-ui, sans-serif; background: #f4f5f7; color: #1a2233; }
[hidden] { display: none !important; }
a { color: #0b57a4; }
a:hover { color: #083f78; }

.page { background: #f4f5f7; color: #1a2233; font-size: 15px; line-height: 1.7; }

/* 上の帯 */
header.top { background: #ffffff; border-bottom: 1px solid #d9dde3; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 16px 24px; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.brand-name { font-size: 18px; font-weight: 700; }
.logout { margin: 0; }
.logout button { border: 0; background: none; padding: 0; color: #4a5463; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.logout button:hover { color: #1a2233; }
nav.steps { display: flex; flex-wrap: wrap; gap: 8px; }
nav.steps a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 6px; border: 1px solid #c9ced6; color: #1a2233; font-size: 14px; text-decoration: none; }
nav.steps a[aria-current="page"] { border: 0; background: #0b57a4; color: #ffffff; font-weight: 700; }

/* 本文 */
main.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; box-sizing: border-box; display: flex; flex-direction: column; gap: 24px; }
main.main h1 { margin: 0; font-size: 28px; line-height: 1.4; }
.lead { margin: 4px 0 0; color: #4a5463; }
h2 { margin: 0; font-size: 18px; }
.b { font-weight: 700; }
.m0 { margin: 0; }
.muted { margin: 0; color: #4a5463; }
.note { margin: 0; font-size: 13px; color: #4a5463; }
.small { font-size: 13px; }
.bad { color: #8a3f04; }
.vh { position: absolute; left: -9999px; }

/* 枠 */
.card { background: #ffffff; border: 1px solid #d9dde3; border-radius: 8px; padding: 24px; display: flex; flex-direction: column; }
.g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; }

/* ボタン */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 6px; background: #0b57a4; color: #ffffff; font-weight: 700; text-decoration: none; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { color: #ffffff; }
.btn2 { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #b9bfc9; border-radius: 6px; background: #ffffff; color: #1a2233; text-decoration: none; }
button.btn2 { font: inherit; cursor: pointer; }
.btn2:hover { color: #1a2233; }
button.btn:disabled, button.btn2:disabled { opacity: .5; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btns.g16 { gap: 16px; }
#p-msg:empty { display: none; }

/* 入力の部品 */
.f { display: flex; flex-direction: column; gap: 4px; }
.f label, .lbl { font-size: 13px; color: #4a5463; }
.f input, .f select, .f textarea, .pick-row select, .kind-note { min-height: 44px; padding: 0 12px; border: 1px solid #b9bfc9; border-radius: 6px; font: inherit; color: #1a2233; background: #ffffff; box-sizing: border-box; width: 100%; }
.f textarea { padding: 10px 12px; line-height: 1.7; }
.f input[readonly] { background: #f8f9fb; }
.kind-note:disabled { background: #f8f9fb; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.err { margin: 0; color: #8a3f04; background: #fff1e0; padding: 8px 12px; border-radius: 6px; }

/* 名前の札（添付する資料・買い取る地域） */
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 12px; border: 1px solid #d9dde3; border-radius: 6px; background: #f8f9fb; }
.chip-x { border: 0; background: none; padding: 0 0 0 8px; color: #0b57a4; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.chip-x:hover { color: #083f78; }

/* 画面 1: 買取業者のリスト */
.head-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.f-q { flex: 1 1 260px; }
.f-sel { flex: 0 1 200px; }
.count { margin: 0; padding-bottom: 8px; color: #4a5463; }
.table-wrap { overflow-x: auto; background: #ffffff; border: 1px solid #d9dde3; border-radius: 8px; }
table.list { border-collapse: collapse; width: 100%; min-width: 1040px; font-size: 14px; line-height: 1.6; }
table.list th, table.list td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #e3e6eb; }
table.list th { font-size: 13px; font-weight: 500; color: #4a5463; background: #f8f9fb; white-space: nowrap; }
table.list td.co { font-weight: 700; }
table.list tr.off { color: #5b6472; background: #f8f9fb; }
.badge { color: #8a3f04; background: #fff1e0; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.page[data-page="list"] .foot-row { gap: 16px; }

/* 業者の追加・編集（ダイアログ） */
#v-dlg { padding: 0; border: 0; background: transparent; color: #1a2233; width: calc(100% - 32px); max-width: 760px; max-height: calc(100% - 32px); }
#v-dlg::backdrop { background: rgba(26, 34, 51, .45); }
.dlg-card { gap: 20px; box-sizing: border-box; }
.pick-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pick-row select { flex: 1 1 180px; width: auto; }
.kind-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.kind-row .check { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 8em; font-size: 15px; color: #1a2233; cursor: pointer; }
.kind-row .check input { width: 20px; height: 20px; margin: 0; min-height: 0; }
.kind-note { flex: 1 1 220px; width: auto; }
.dlg-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* 画面 2・4: 2 列 */
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.c-main { flex: 999 1 560px; min-width: 0; box-sizing: border-box; }
.c-side { flex: 1 1 280px; min-width: 0; box-sizing: border-box; }
.c-side .note { margin: 4px 0 0; }
.att { display: flex; flex-direction: column; gap: 8px; }

/* 画面 3: 送る業者の選択 */
.summary { padding: 16px 24px; flex-direction: row; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; }
.sgrid { min-width: 980px; font-size: 14px; line-height: 1.6; }
.srow { display: grid; grid-template-columns: 60px 1.6fr 2.4fr 1.6fr 1.2fr; gap: 0 16px; align-items: center; padding: 8px 16px; border-bottom: 1px solid #e3e6eb; }
.srow.shead { padding: 10px 16px; background: #f8f9fb; font-size: 13px; font-weight: 500; color: #4a5463; }
.srow.off { padding: 12px 16px; background: #f8f9fb; color: #5b6472; border-bottom: 0; }
.srow .sub { color: #4a5463; }
.srow .miss { color: #8a3f04; }
.srow .ck { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.srow .ck input { width: 20px; height: 20px; margin: 0; }
h2.g-head { margin: 0; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #e3e6eb; }
.g-match { background: #eaf2fb; color: #0a3d73; }
.g-part { background: #fff1e0; color: #8a3f04; }
.g-none { background: #f0f1f4; color: #3a4350; }

/* 画面 4: メールの確認と送信 */
.c-side4 { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.to-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.to-list li:not(:last-child) { padding-bottom: 12px; border-bottom: 1px solid #e3e6eb; }
.addr { font-size: 13px; color: #4a5463; overflow-wrap: anywhere; }
dl.kv, dl.mail-dl { margin: 0; display: grid; grid-template-columns: 8em 1fr; gap: 4px 16px; }
dl.kv dt, dl.mail-dl dt { color: #4a5463; }
dl.kv dd, dl.mail-dl dd { margin: 0; }
dl.mail-dl { padding: 16px; background: #f8f9fb; border-radius: 6px; }
.mail-box { border: 1px solid #d9dde3; border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 16px; line-height: 1.9; }
.mail-box p { margin: 0; }
.hl { background: #e3effc; padding: 2px 6px; border-radius: 4px; }
/* 送信のあとに出す、作ったメール（1 通ずつ） */
.sent-item { border: 1px solid #d9dde3; border-radius: 6px; }
.sent-item > summary { padding: 10px 16px; cursor: pointer; }
.sent-item[open] > summary { border-bottom: 1px solid #e3e6eb; }
.sent-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sent-body dl.kv { grid-template-columns: 4em 1fr; }
.sent-body dl.kv dd { overflow-wrap: anywhere; }
pre.mail-text { margin: 0; padding: 16px; background: #f8f9fb; border-radius: 6px; font: inherit; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ログイン */
main.auth { max-width: 440px; margin: 0 auto; padding: 10vh 16px 48px; box-sizing: border-box; }
.auth-card { gap: 16px; }
.auth-title { margin: 0; font-size: 18px; font-weight: 700; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { justify-content: center; }
.codes { margin: 0; }
