/* =========================================================
   ARCHI PLANNER — スタイル（建築図面・設計事務所のトーン）
   ========================================================= */
:root {
  --paper: #f4f1ea;
  --paper-2: #fbfaf6;
  --ink: #1c1c1a;
  --ink-2: #4a4a46;
  --muted: #7a776f;
  --line: #cfc9bb;
  --line-2: #e6e1d5;
  --accent: #8a5a3c;      /* 銅・テラコッタ */
  --accent-2: #3b5b5e;    /* 深い青緑 */
  --ok: #4f7a5a; --warn: #a4762b; --ng: #a44a3c;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --latin: "Cormorant Garamond", Georgia, serif;
  --label: "Jost", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-weight: 400; line-height: 1.7; font-size: 15px;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 40px 40px; background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: 0.04em; }
a { color: var(--accent-2); }
small { font-size: 0.8em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow { font-family: var(--label); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; font-weight: 500; }
.quote { font-family: var(--serif); color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 12px; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 32px; background: rgba(244,241,234,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 30px; height: 30px; border: 1.5px solid var(--ink); position: relative; }
.brand-mark::before { content: ""; position: absolute; inset: 6px; border: 1.5px solid var(--accent); }
.brand-en { font-family: var(--latin); font-size: 20px; letter-spacing: 0.22em; line-height: 1; font-weight: 500; }
.brand-ja { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); margin-top: 3px; }
.steps-nav { display: flex; align-items: center; gap: 10px; }
.step-pill { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px 6px 10px; font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; gap: 10px; }
.step-pill span { font-family: var(--label); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.step-pill.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.step-pill.is-active span { color: #d9b89a; }
.step-pill:disabled { opacity: 0.4; cursor: default; }
.step-sep { width: 32px; height: 1px; background: var(--line); }
.header-actions { display: flex; gap: 8px; }

/* ---------- ボタン ---------- */
.btn { font-family: var(--sans); border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 10px 20px; cursor: pointer; letter-spacing: 0.12em; font-size: 14px; transition: all .18s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.ghost.danger:hover { border-color: var(--ng); color: var(--ng); }
.btn.small { padding: 6px 14px; font-size: 12.5px; }
.btn.large { padding: 16px 36px; font-size: 16px; }
.btn .arrow { margin-left: 8px; font-family: var(--label); }

/* ---------- ビュー ---------- */
.view { display: none; max-width: 1180px; margin: 0 auto; padding: 40px 32px 80px; }
.view.is-active { display: block; }

/* ---------- 入力ヒーロー ---------- */
.hero-input { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: end; padding: 30px 0 40px; border-bottom: 1px solid var(--ink); margin-bottom: 40px; }
.hero-input h1 { font-size: 44px; line-height: 1.3; font-weight: 500; }
.hero-input h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--ink-2); max-width: 680px; font-size: 14.5px; }
.hero-meta { border: 1px solid var(--line); padding: 14px 18px; background: var(--paper-2); }
.meta-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-family: var(--label); font-size: 12px; letter-spacing: 0.15em; }
.meta-row:last-child { border-bottom: 0; }
.meta-row strong { font-weight: 500; }

/* ---------- セクション ---------- */
.sec { background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 26px; position: relative; }
.sec-head { display: flex; align-items: center; gap: 20px; padding: 18px 26px; border-bottom: 1px solid var(--line-2); }
.sec-no { font-family: var(--latin); font-size: 34px; color: var(--accent); line-height: 1; min-width: 50px; }
.sec-title h2 { font-size: 20px; }
.sec-en { margin: 0; font-family: var(--label); font-size: 10.5px; letter-spacing: 0.3em; color: var(--muted); }
.omakase { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.1em; cursor: pointer; user-select: none; }
.omakase input { appearance: none; width: 44px; height: 24px; border-radius: 999px; border: 1px solid var(--ink); position: relative; cursor: pointer; margin: 0; transition: .2s; }
.omakase input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: .2s; }
.omakase input:checked { background: var(--accent); border-color: var(--accent); }
.omakase input:checked::after { left: 23px; background: #fff; }
.sec-body { padding: 22px 26px 26px; transition: opacity .2s; }
.sec.is-omakase .sec-body { opacity: 0.35; pointer-events: none; }
.sec.is-omakase::after { content: "この項目は「お任せ」で自動決定されます"; position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); font-family: var(--serif); font-size: 15px; letter-spacing: 0.2em; color: var(--accent); background: var(--paper-2); padding: 8px 18px; border: 1px solid var(--accent); pointer-events: none; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; padding: 22px 26px; }
.sec-body > .grid { padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; padding: 0; }
.field > span, .field-label { font-size: 12px; letter-spacing: 0.1em; color: var(--ink-2); }
.field input, .field select, .field textarea, .inline input, .inline select {
  font-family: var(--sans); font-size: 14.5px; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); outline: none; width: 100%; border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field textarea { border: 1px solid var(--line); padding: 12px; background: #fff; resize: vertical; }
.inline { display: flex; gap: 10px; }
.inline select { width: 90px; }
.field-block { margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips label { border: 1px solid var(--line); padding: 7px 14px; font-size: 13px; cursor: pointer; background: #fff; transition: .15s; letter-spacing: 0.04em; }
.chips label:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips input { display: none; }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 10px; }
.card { border: 1px solid var(--line); background: #fff; padding: 14px 12px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: .15s; position: relative; }
.card input { display: none; }
.card .card-icon { width: 60px; height: 44px; color: var(--ink-2); margin-bottom: 6px; }
.card .card-icon svg { width: 100%; height: 100%; }
.card b { font-weight: 500; font-size: 14px; font-family: var(--serif); }
.card em { font-style: normal; font-family: var(--label); font-size: 10px; letter-spacing: 0.2em; color: var(--accent); }
.card small { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.card.is-selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.card.is-selected::after { content: "SELECTED"; position: absolute; top: 8px; right: 10px; font-family: var(--label); font-size: 9px; letter-spacing: 0.2em; color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; gap: 14px; padding: 20px 0 0; align-items: center; }

/* ---------- 結果ツールバー ---------- */
.result-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); padding-bottom: 0; flex-wrap: wrap; }
.variants { display: flex; gap: 4px; flex-wrap: wrap; }
.vtab { background: transparent; border: 1px solid var(--line); border-bottom: 0; padding: 8px 16px; cursor: pointer; font-family: var(--sans); display: flex; flex-direction: column; align-items: flex-start; gap: 0; color: var(--ink-2); min-width: 96px; position: relative; }
.vtab span { font-family: var(--label); font-size: 12px; letter-spacing: 0.15em; }
.vtab small { font-size: 10.5px; color: var(--muted); }
.vtab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vtab.is-active small { color: #cfc5b7; }
.vtab.starred::before { content: "★"; position: absolute; top: 4px; right: 6px; font-size: 10px; color: #d2a24c; }
.vtab.add, .vtab.regen { justify-content: center; align-items: center; color: var(--accent); border-style: dashed; font-size: 12.5px; letter-spacing: 0.08em; }
.vtab.add:hover, .vtab.regen:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.toolbar-right { display: flex; gap: 8px; padding-bottom: 8px; }
.pattern-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.pattern-actions .muted { margin-left: auto; font-family: var(--label); letter-spacing: 0.1em; }

/* ---------- 提案書 ---------- */
.doc { }
.proposal, .compare { background: var(--paper-2); border: 1px solid var(--line); padding: 0; }
.cover { padding: 44px 56px 40px; border-bottom: 1px solid var(--ink); position: relative; }
.cover-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.strategy-label { font-family: var(--serif); font-size: 18px; margin: 0; letter-spacing: 0.1em; }
.cover-meta { display: flex; gap: 28px; }
.cover-meta div { display: flex; flex-direction: column; }
.cover-meta span { font-family: var(--label); font-size: 10px; letter-spacing: 0.25em; color: var(--muted); }
.cover-meta strong { font-weight: 500; font-size: 13px; }
.concept-title { font-size: 52px; font-weight: 500; line-height: 1.25; letter-spacing: 0.06em; }
.concept-en { font-family: var(--label); font-size: 12px; letter-spacing: 0.3em; color: var(--accent); margin: 10px 0 14px; }
.concept-copy { color: var(--ink-2); max-width: 820px; margin: 0 0 28px; }
.exterior-wrap { border: 1px solid var(--ink); background: #fff; }
.exterior-wrap svg { display: block; width: 100%; height: auto; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--ink); border-top: 0; background: #fff; }
.stats > div { padding: 14px 16px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; }
.stats > div:last-child { border-right: 0; }
.stats span { font-family: var(--label); font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.stats strong { font-family: var(--latin); font-size: 30px; font-weight: 500; line-height: 1.1; margin-top: 4px; }
.stats strong small { font-size: 13px; font-family: var(--sans); margin-left: 2px; }
.stats em { font-style: normal; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.budget-line { margin: 14px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; letter-spacing: 0.08em; padding: 4px 12px; border: 1px solid; }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.near { color: var(--warn); border-color: var(--warn); }
.badge.over { color: var(--ng); border-color: var(--ng); }
.badge.warn { color: var(--warn); border-color: var(--warn); font-size: 11.5px; }
.ng { color: var(--ng); }

.doc-sec { padding: 36px 56px; border-bottom: 1px solid var(--line); }
.doc-sec:last-child { border-bottom: 0; }
.doc-sec > header { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; }
.doc-sec > header .no { font-family: var(--latin); font-size: 30px; color: var(--accent); }
.doc-sec > header h2 { font-size: 22px; }
.doc-sec > header .en { font-family: var(--label); font-size: 10.5px; letter-spacing: 0.3em; color: var(--muted); margin-left: auto; }
.doc-sec h4 { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0.15em; color: var(--ink-2); margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--accent); }
.doc-sec h4 + * { margin-top: 0; }
.doc-sec h4:not(:first-child) { margin-top: 24px; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.strategy-desc { font-family: var(--serif); font-size: 16px; color: var(--ink); margin: 0 0 14px; }
.points { padding-left: 0; list-style: none; counter-reset: p; margin: 0; }
.points li { counter-increment: p; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--line-2); }
.points li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 10px; font-family: var(--latin); font-size: 20px; color: var(--accent); }
.auto-box { background: #fff; border: 1px solid var(--line); padding: 18px 20px; font-size: 13.5px; }
.auto-box ul { margin: 0; padding-left: 18px; }
.auto-box li { margin-bottom: 4px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.plan-card { border: 1px solid var(--ink); background: #fff; }
.plan-card svg { display: block; width: 100%; height: auto; }
.rooms { display: flex; gap: 30px; margin-top: 20px; flex-wrap: wrap; }
.room-list h4 { margin-bottom: 6px; }
.room-list ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; min-width: 300px; }
.room-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; border-bottom: 1px dotted var(--line); break-inside: avoid; }
.room-list li b { font-weight: 500; font-family: var(--label); }

table.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.kv th { text-align: left; width: 32%; font-weight: 500; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); letter-spacing: 0.05em; }
table.kv td { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
table.kv .note { color: var(--muted); font-size: 12px; margin-top: 2px; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { display: flex; flex-direction: column; gap: 4px; }
.swatch span { display: block; height: 54px; border: 1px solid var(--line); }
.swatch small { font-size: 11px; letter-spacing: 0.1em; }
.swatch code { font-family: var(--label); font-size: 10px; color: var(--muted); }

table.mat { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mat th { text-align: left; font-weight: 500; font-family: var(--label); letter-spacing: 0.1em; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 8px 10px; }
table.mat td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.mat td b { font-weight: 500; }
.cost-dot { display: inline-block; width: 26px; height: 26px; border-radius: 50%; text-align: center; line-height: 26px; font-size: 11px; color: #fff; }
.c-低 { background: #7f9a7a; } .c-中 { background: #b08a4f; } .c-高 { background: #8a4d3c; }

table.cost { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.cost th { text-align: left; font-weight: 500; padding: 10px 0; border-bottom: 1px solid var(--line-2); width: 34%; }
table.cost td { padding: 10px 0; border-bottom: 1px solid var(--line-2); font-family: var(--latin); font-size: 20px; white-space: nowrap; }
table.cost td small { font-family: var(--sans); font-size: 11px; margin-left: 2px; }
table.cost td.sub { font-family: var(--sans); font-size: 11.5px; color: var(--muted); white-space: normal; padding-left: 14px; }
table.cost tr.total th, table.cost tr.total td { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 14px; }
table.cost tr.total td { font-size: 28px; color: var(--accent); }
.loan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.loan > div { background: #fff; border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; }
.loan span { font-family: var(--label); font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.loan strong { font-family: var(--latin); font-size: 24px; font-weight: 500; }
.loan strong small { font-family: var(--sans); font-size: 11px; }
.loan em { font-style: normal; font-size: 11px; color: var(--ink-2); }
.opt-list { list-style: none; padding: 0; margin: 0; }
.opt-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 13px; }
.opt-list b { font-weight: 500; font-family: var(--label); }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tl { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); padding: 14px; }
.tl-no { font-family: var(--latin); font-size: 26px; color: var(--accent); line-height: 1; }
.tl b { font-weight: 500; display: block; font-size: 14px; }
.tl em { font-style: normal; font-family: var(--label); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-2); display: block; margin: 4px 0; }
.tl p { margin: 0; font-size: 12px; color: var(--muted); }
.subs { list-style: none; padding: 0; margin: 0; }
.subs li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.subs b { font-weight: 500; display: block; font-size: 14px; }
.subs .amt { font-family: var(--latin); color: var(--accent); font-size: 17px; }
.subs p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sources { font-size: 13px; padding-left: 18px; }
.sources li { margin-bottom: 4px; }
.disclaimer { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }

/* ---------- 比較 ---------- */
.compare-head { padding: 44px 56px 20px; }
.compare-head h1 { font-size: 36px; }
.compare-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 0 56px 30px; }
.cmp-card { background: #fff; border: 1px solid var(--line); padding: 0; text-align: left; cursor: pointer; font-family: var(--sans); color: var(--ink); transition: .15s; position: relative; }
.cmp-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.cmp-card.starred::after { content: "★ 候補"; position: absolute; top: 8px; right: 8px; background: #d2a24c; color: #fff; font-size: 10px; padding: 2px 8px; letter-spacing: 0.1em; }
.cmp-thumb { aspect-ratio: 1200 / 760; overflow: hidden; border-bottom: 1px solid var(--line-2); }
.cmp-thumb svg { width: 100%; height: 100%; display: block; }
.cmp-thumb svg text { display: none; }
.cmp-body { padding: 12px 14px 14px; }
.cmp-body h3 { font-size: 17px; }
.cmp-strategy { margin: 2px 0 8px; font-size: 11.5px; color: var(--muted); }
.cmp-stats { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--label); font-size: 11px; letter-spacing: 0.05em; }
.cmp-stats span { border: 1px solid var(--line); padding: 2px 7px; }
.cmp-stats .price { border-color: var(--accent); color: var(--accent); }
.compare-table-wrap { padding: 0 56px 44px; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.compare-table th { font-weight: 500; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.compare-table thead th { font-family: var(--label); letter-spacing: 0.1em; font-size: 12px; }
.compare-table thead th small { font-family: var(--sans); color: var(--muted); letter-spacing: 0; font-size: 11px; }
.compare-table tbody th { width: 120px; color: var(--ink-2); font-size: 12.5px; border-bottom: 1px solid var(--line-2); background: var(--paper-2); }
.compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2); vertical-align: top; }
.compare-table td small { color: var(--muted); }

/* ---------- モーダル／トースト ---------- */
.modal { position: fixed; inset: 0; background: rgba(28,28,26,0.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper-2); border: 1px solid var(--ink); width: min(720px, 100%); max-height: 85vh; overflow: auto; padding: 22px 26px; }
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-card .close { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink-2); }
.modal-card textarea { width: 100%; font-family: var(--label); font-size: 13px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.sheet-month { border-top: 1px solid var(--line-2); }
.sheet-month > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; padding: 10px 0; font-size: 14px; }
.sheet-month > summary::-webkit-details-marker { display: none; }
.sheet-month > summary::before { content: "▸"; color: var(--muted); font-size: 12px; }
.sheet-month[open] > summary::before { content: "▾"; }
.sheet-month > summary b { font-weight: 500; letter-spacing: 0.08em; }
.sheet-month .sheet-list { padding-left: 18px; padding-bottom: 6px; }
.sheet-list { list-style: none; padding: 0; margin: 0; }
.sheet-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.sheet-list b { font-weight: 500; display: block; }
.sheet-list small { color: var(--muted); }
.sheet-list li > div:last-child { display: flex; gap: 6px; }
#toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 22px; font-size: 13px; letter-spacing: 0.1em; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-footer { text-align: center; font-size: 11.5px; color: var(--muted); padding: 30px 20px 40px; letter-spacing: 0.05em; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .hero-input { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > div:nth-child(3) { border-right: 0; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .loan { grid-template-columns: 1fr 1fr; }
  .cover, .doc-sec, .compare-head, .compare-cards, .compare-table-wrap { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; padding: 12px 16px; }
  .view { padding: 20px 14px 60px; }
  .grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-input h1 { font-size: 30px; }
  .concept-title { font-size: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .sec-head { flex-wrap: wrap; }
}

/* ---------- 印刷 ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .no-print, .result-toolbar, .pattern-actions, #toast, .modal { display: none !important; }
  .view { padding: 0; max-width: none; }
  .proposal, .compare { border: 0; }
  .cover, .doc-sec { padding: 10mm 0; break-inside: avoid; }
  .doc-sec { page-break-inside: avoid; }
  .cover { page-break-after: always; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .compare-cards { grid-template-columns: repeat(3, 1fr); }
  a { color: inherit; text-decoration: none; }
}

/* 価格表の数値は折り返さない */
table.cost td:nth-child(2) { white-space: nowrap; width: 1%; padding-right: 16px; }
table.cost tr.total td { font-size: 26px; }

/* ---------- 3D：外観・内装・見学ツアー ---------- */
.hero3d { position: relative; background: #dfe7ee; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero3d .hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-tag { position: absolute; right: 14px; bottom: 12px; font-family: var(--label); font-size: 10.5px; letter-spacing: 0.25em; color: #fff; background: rgba(28,28,26,0.6); padding: 4px 10px; }
.still-placeholder { font-family: var(--serif); letter-spacing: 0.2em; color: var(--muted); padding: 40px; text-align: center; }
.sketch-wrap { margin-bottom: 18px; }
.exterior-wrap.sketch { max-width: 520px; }
.stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.still { margin: 0; border: 1px solid var(--line); background: #fff; }
.still img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.still figcaption { font-size: 12.5px; letter-spacing: 0.12em; padding: 8px 10px; border-top: 1px solid var(--line-2); font-family: var(--sans); }
.stills .still:first-child { grid-column: span 2; }
.tour-wrap { position: relative; background: #111; border: 1px solid var(--ink); }
.tour-wrap canvas { display: block; width: 100%; height: auto; }
.tour-hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.65)); color: #fff; font-size: 13px; letter-spacing: 0.08em; pointer-events: none; }
.tour-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tour-ctl .seg { display: inline-flex; border: 1px solid var(--line); }
.tour-ctl .seg .btn { border: 0; border-right: 1px solid var(--line); }
.tour-ctl .seg .btn:last-child { border-right: 0; }
.tour-ctl .seg .btn.is-on { background: var(--ink); color: var(--paper); }
.tour-ctl .speed { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tour-ctl .speed input { width: 90px; accent-color: var(--accent); }
.tour-status { font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.doc-sec > header .no small { font-size: 14px; vertical-align: super; color: var(--accent); }
@media (max-width: 900px) { .stills { grid-template-columns: 1fr 1fr; } }
@media print { .tour, .tour-ctl { display: none !important; } .stills { grid-template-columns: repeat(3, 1fr); } }

/* ---------- デモ録画 ---------- */
#demoCap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: rgba(28,28,26,0.93); color: #f4f1ea; font: 500 18px/1.4 var(--sans); padding: 12px 26px; letter-spacing: 0.06em; border-top: 3px solid var(--accent); display: flex; gap: 18px; align-items: center; }
#demoCap b { font-family: var(--label); font-weight: 500; color: #d9b89a; letter-spacing: 0.2em; font-size: 12px; white-space: nowrap; }
.demo-hl { outline: 3px solid #e2762d !important; outline-offset: 3px; box-shadow: 0 0 0 8px rgba(226,118,45,0.22) !important; }

/* ---------- 建物種別・自由入力・お気に入り・新規作成 ---------- */
.btype-block { padding: 22px 26px 0; }
.btype { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.btype label { border: 1px solid var(--line); background: #fff; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; position: relative; }
.btype label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.btype input { position: absolute; opacity: 0; }
.btype b { font-family: var(--serif); font-weight: 500; font-size: 15px; }
.btype small { color: var(--muted); font-size: 11.5px; }
body[data-btype="mansion"] .house-only { display: none !important; }
body[data-btype="house"] .mansion-only { display: none !important; }
.field.free { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.field.free > span { color: var(--accent); }
.modal-card.wide { width: min(980px, 100%); }
.fav-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fav-card { border: 1px solid var(--line); background: #fff; cursor: pointer; position: relative; text-align: left; padding: 0; font-family: var(--sans); color: var(--ink); }
.fav-card:hover { border-color: var(--ink); }
.fav-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: #dfe7ee; }
.fav-card .thumb img, .fav-card .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-card .body { padding: 10px 12px 12px; }
.fav-card h4 { font-family: var(--serif); font-size: 15px; margin: 0; }
.fav-card small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.fav-card .price { font-family: var(--latin); color: var(--accent); font-size: 16px; }
.fav-card .del { position: absolute; top: 6px; right: 6px; background: rgba(28,28,26,0.7); color: #fff; border: 0; width: 24px; height: 24px; cursor: pointer; font-size: 14px; }
.new-opts { display: flex; flex-direction: column; gap: 10px; }
.new-opts .btn { text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.new-opts .btn small { font-size: 11px; opacity: 0.8; letter-spacing: 0.02em; }
.new-opts .btn.primary small { color: #d9d2c4; }
.sheet-list .tag { display: inline-block; font-size: 10px; letter-spacing: 0.15em; padding: 1px 7px; border: 1px solid var(--warn); color: var(--warn); margin-left: 6px; vertical-align: middle; }

/* ---------- 担当者・判定・最終調整・追加要望・並列比較・色パネル ---------- */
.account-bar { display: flex; align-items: center; gap: 6px; margin-right: 10px; }
.acc-label { font-size: 11px; letter-spacing: 0.15em; color: var(--muted); }
#accSelect { font-family: var(--sans); font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); background: #fff; max-width: 200px; }
.verdict { display: inline-block; font-size: 11px; letter-spacing: 0.08em; padding: 2px 9px; border: 1px solid; margin-left: 10px; vertical-align: middle; font-family: var(--sans); font-weight: 400; }
.v-ok { color: var(--ok); border-color: var(--ok); } .v-hold { color: var(--warn); border-color: var(--warn); } .v-ng { color: var(--ng); border-color: var(--ng); }
.cmp-verdicts { margin-top: 6px; display: flex; gap: 4px; } .cmp-verdicts i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; } .cmp-verdicts .v-ok { background: var(--ok); } .cmp-verdicts .v-hold { background: var(--warn); } .cmp-verdicts .v-ng { background: var(--ng); }
.badge.info { color: var(--accent-2); border-color: var(--accent-2); }
.editable { outline: none; cursor: text; border-bottom: 1px dashed transparent; transition: .15s; }
.editable:hover { border-bottom-color: var(--accent); } .editable:focus { background: #fff; border-bottom-color: var(--accent); }
.extra-box { margin-top: 16px; background: #fff; border: 1px solid var(--line); padding: 12px 16px; font-size: 13px; } .extra-box ul { margin: 0; padding-left: 18px; }
.adjust-panel { background: #fff; border: 1px solid var(--accent); margin-bottom: 18px; padding: 18px 22px; }
.adj-head h3 { font-size: 18px; } .adj-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin: 14px 0; }
.adj-box { border: 1px solid var(--line); padding: 14px 16px; background: var(--paper-2); } .adj-box h4 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.12em; margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--accent); }
.adj-box textarea { width: 100%; font-family: var(--sans); font-size: 13.5px; padding: 10px; border: 1px solid var(--line); margin-bottom: 8px; }
.verdicts { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; } .verdicts th { text-align: left; font-weight: 500; padding: 6px 8px 6px 0; width: 150px; border-bottom: 1px solid var(--line-2); } .verdicts td { padding: 6px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.verdicts input[type=text] { flex: 1; min-width: 160px; font-family: var(--sans); font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); }
.seg3 { display: inline-flex; border: 1px solid var(--line); } .seg3 label { padding: 4px 10px; font-size: 12px; cursor: pointer; border-right: 1px solid var(--line); } .seg3 label:last-child { border-right: 0; } .seg3 input { display: none; }
.seg3 label.v-ok:has(input:checked) { background: var(--ok); color: #fff; } .seg3 label.v-hold:has(input:checked) { background: var(--warn); color: #fff; } .seg3 label.v-ng:has(input:checked) { background: var(--ng); color: #fff; }
.extra-log { margin-top: 10px; font-size: 12.5px; } .extra-log ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.adj-form .grid { padding: 0; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; } .adj-form .chips label { font-size: 12px; padding: 5px 10px; } .adj-form .form-actions { padding-top: 14px; }
.parsed { font-size: 12.5px; color: var(--ink-2); margin: 6px 0 0; } .parsed span { display: inline-block; border: 1px solid var(--accent); color: var(--accent); padding: 1px 8px; margin: 2px 4px 2px 0; font-size: 11.5px; }
.sel-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border: 1px dashed var(--line); font-size: 13px; color: var(--muted); } .sel-bar.is-on { border-color: var(--accent); color: var(--ink); background: #fff; }
.cmp-check { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255,255,255,0.92); border: 1px solid var(--line); padding: 3px 8px; font-size: 11px; display: flex; gap: 5px; align-items: center; cursor: pointer; } .cmp-check input { accent-color: var(--accent); margin: 0; }
.cmp-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cmp-card.fav::before { content: "♥"; position: absolute; top: 8px; right: 8px; color: #c0504d; background: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: 12px; z-index: 2; }
.cmp-card.starred.fav::after { right: 36px; }
.vtab.fav span::after { content: " ♥"; color: #c0504d; } .vtab.sel { border-color: var(--accent); color: var(--accent); }
.sel-grid { display: grid; gap: 18px; padding: 0 56px 44px; } .sel-grid.cols-2 { grid-template-columns: 1fr 1fr; } .sel-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; } .sel-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .sel-grid.cols-5 { grid-template-columns: repeat(5, 1fr); } .sel-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.sel-col { background: #fff; border: 1px solid var(--line); padding: 16px; } .sel-col .stats { grid-template-columns: repeat(3, 1fr); margin: 10px 0; border: 1px solid var(--line); } .sel-col .stats strong { font-size: 20px; } .sel-col h3 { font-size: 18px; } .sel-col h4 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; margin: 14px 0 6px; padding-left: 8px; border-left: 2px solid var(--accent); }
.sel-img { aspect-ratio: 16/10; overflow: hidden; background: #dfe7ee; margin-top: 10px; border: 1px solid var(--line); } .sel-img img, .sel-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.sel-plan { border: 1px solid var(--line); margin-top: 10px; } .sel-plan svg { width: 100%; height: auto; display: block; }
.sel-col .points.small li { font-size: 12.5px; padding: 6px 0 6px 32px; } .sel-col .points.small li::before { font-size: 16px; }
.sel-col table.cost td { font-size: 16px; } .sel-col table.cost tr.total td { font-size: 20px; }
.color-panel { margin-top: 12px; border: 1px solid var(--line); background: #fff; padding: 12px 16px; } .cp-head { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; } .cp-head h4 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.12em; margin: 0; padding-left: 10px; border-left: 2px solid var(--accent); }
.cp-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 20px; } .cp-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; } .cp-row > span:first-child { width: 120px; color: var(--ink-2); } .cp-row input[type=color] { width: 36px; height: 26px; border: 1px solid var(--line); padding: 0; background: none; cursor: pointer; }
.cp-presets { display: flex; gap: 3px; flex-wrap: wrap; } .cp-presets i { width: 16px; height: 16px; border: 1px solid rgba(0,0,0,0.2); cursor: pointer; display: inline-block; } .cp-presets i:hover { outline: 2px solid var(--accent); }
.cp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tour-dpad { display: inline-grid; grid-template-columns: repeat(3, 34px); grid-auto-rows: 30px; gap: 3px; margin-left: 8px; vertical-align: middle; } .tour-dpad button { font-family: var(--label); font-size: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; user-select: none; } .tour-dpad button:active, .tour-dpad button.is-on { background: var(--ink); color: #fff; }
.tour-wrap canvas:focus { outline: 2px solid var(--accent); }
@media (max-width: 1000px) { .adj-grid { grid-template-columns: 1fr; } .adj-form .grid { grid-template-columns: repeat(2, 1fr); } .sel-grid { grid-template-columns: 1fr !important; padding: 0 24px 30px; } .cp-rows { grid-template-columns: 1fr; } }
@media print { .adjust-panel, .color-panel, .sel-bar, .cmp-check { display: none !important; } }

/* ---------- ログイン画面 ---------- */
.login { position: fixed; inset: 0; z-index: 100; background: var(--paper); background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 40px 40px; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; transition: opacity .35s; }
.login.is-hidden { opacity: 0; pointer-events: none; }
.login-card { width: min(640px, 100%); background: var(--paper-2); border: 1px solid var(--ink); padding: 36px 40px; }
.brand.big .brand-en { font-size: 28px; } .brand.big .brand-mark { width: 40px; height: 40px; }
.login-lead { margin: 22px 0 10px; color: var(--ink-2); }
.login-form { display: flex; gap: 12px; align-items: flex-end; } .login-form .field { flex: 1; }
.login-actions { display: flex; gap: 14px; align-items: center; margin: 22px 0 18px; flex-wrap: wrap; }
.homescreen { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; } .homescreen summary { cursor: pointer; font-family: var(--serif); font-size: 15px; letter-spacing: 0.05em; }
.hs-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0 8px; } .hs-tabs button { font-family: var(--sans); font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; } .hs-tabs button.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hs-body ol { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.8; }

/* ---------- 端末別レスポンシブ（スマホ・タブレット・PC） ---------- */
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas, video { max-width: 100%; }
.compare-table-wrap, .mat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.mat { min-width: 720px; } .compare-table { min-width: 640px; }
.doc-sec > header { flex-wrap: wrap; }
@media (max-width: 1100px) {
  .site-header { padding: 10px 16px; gap: 10px; }
  .steps-nav { order: 3; width: 100%; justify-content: center; } .header-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .cover, .doc-sec, .compare-head, .compare-cards, .compare-table-wrap { padding-left: 20px; padding-right: 20px; }
  .concept-title { font-size: 34px; }
}
@media (max-width: 820px) {
  body { font-size: 14px; }
  .view { padding: 16px 12px 60px; }
  .hero-input { gap: 18px; padding: 10px 0 24px; } .hero-input h1 { font-size: 28px; }
  .sec-head { padding: 14px 16px; gap: 12px; } .sec-no { font-size: 26px; min-width: 36px; } .sec-body, .grid { padding: 16px; }
  .grid, .btype, .cards, .adj-form .grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); } .stats > div:nth-child(2n) { border-right: 0; } .stats strong { font-size: 22px; }
  .loan { grid-template-columns: 1fr 1fr; } .timeline { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr; }
  .stills { grid-template-columns: 1fr 1fr; } .stills .still:first-child { grid-column: span 2; }
  .plans { grid-template-columns: 1fr; } .room-list ul { columns: 1; min-width: 0; }
  .result-toolbar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; } .variants { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; width: 100%; max-width: 100%; min-width: 0; } .vtab { min-width: auto; flex: 0 0 auto; }
  .toolbar-right { flex-wrap: wrap; width: 100%; max-width: 100%; min-width: 0; } .pattern-actions .btn { font-size: 11.5px; padding: 6px 9px; }
  .tour-ctl { gap: 6px; } .tour-ctl .btn { font-size: 11.5px; padding: 6px 9px; }
  .modal-card { padding: 16px; max-height: 92vh; } .fav-list { grid-template-columns: 1fr 1fr; }
  .cover-head { flex-direction: column; gap: 12px; } .cover-meta { flex-wrap: wrap; gap: 14px; }
  .compare-cards { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 22px 18px; } .login-form { flex-direction: column; align-items: stretch; }
  #demoCap { font-size: 14px; padding: 10px 14px; }
  .form-actions { flex-direction: column; align-items: stretch; } .btn.large { padding: 14px 20px; }
  .account-bar { order: 2; }
}
@media (max-width: 520px) {
  .grid, .btype, .cards, .adj-form .grid, .stills, .compare-cards, .fav-list, .cp-rows { grid-template-columns: 1fr !important; }
  .stills .still:first-child { grid-column: auto; }
  .stats, .loan { grid-template-columns: 1fr 1fr; }
  .concept-title { font-size: 26px; } .hero-input h1 { font-size: 24px; } .sec-title h2 { font-size: 17px; }
  .brand-en { font-size: 16px; } .brand-ja { display: none; } .step-pill { padding: 5px 10px 5px 8px; font-size: 12px; }
  .header-actions .btn { padding: 5px 8px; font-size: 11px; } #accSelect { max-width: 120px; }
  .sec.is-omakase::after { font-size: 12px; padding: 6px 10px; width: 80%; text-align: center; }
  .chips label { font-size: 12px; padding: 6px 10px; }
  table.kv th { width: 38%; font-size: 12.5px; } table.kv td { font-size: 12.5px; }
  table.cost td { font-size: 16px; } table.cost tr.total td { font-size: 20px; }
  .doc-sec > header .en { display: none; } .doc-sec > header h2 { font-size: 18px; }
  .tour-dpad { grid-template-columns: repeat(3, 44px); grid-auto-rows: 38px; margin: 6px 0 0; }
  .sel-col .stats { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) { .tour-dpad button { font-size: 16px; } }
.brand-ja { white-space: nowrap; }
.site-header { flex-wrap: wrap; row-gap: 8px; }

/* ---------- デモ字幕：左下の小さな半透明カード ---------- */
#demoCap { left: 16px; right: auto; bottom: 16px; max-width: min(62vw, 720px); background: rgba(28,28,26,0.82); border: 0; border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 16px; font-size: 14px; line-height: 1.5; flex-direction: column; align-items: flex-start; gap: 2px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); backdrop-filter: blur(4px); }
#demoCap b { font-size: 12px; letter-spacing: 0.12em; color: #e9c9a6; font-family: var(--sans); }
#demoCap span { color: #f4f1ea; opacity: 0.95; }

.login[hidden] { display: none !important; }

/* ---- アカウント（ログイン・パスワード・管理） ---- */
.auth { margin-top: 6px; }
.auth-form { display: block; } .auth-form[hidden] { display: none; }
.auth-form .field { margin-bottom: 14px; }
.auth-lead { margin: 0 0 14px; color: var(--ink-2); line-height: 1.8; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 4px 0 6px; }
.auth-msg { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; background: #fff; }
.auth-msg.error { border-color: #b4463a; color: #8a2f25; background: #fff6f4; }
.auth-msg.info { border-color: var(--accent); color: var(--accent); background: #fffaf3; }
.auth-msg[hidden] { display: none; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { flex: 1; padding-right: 56px; }
.pw-toggle { position: absolute; right: 0; bottom: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 11px; padding: 3px 8px; cursor: pointer; letter-spacing: 0.1em; }
.auth-form.is-busy { opacity: 0.6; pointer-events: none; }
.auth-checking { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 34px 0 26px; color: var(--ink-2); font-size: 16px; letter-spacing: 0.1em; }
.login.is-checking .login-lead, .login.is-checking .login-card details, .login.is-checking .login-card > p.muted { display: none; }
.login.is-checking .auth-checking .auth-spin { width: 22px; height: 22px; }
.auth-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -3px; margin-right: 8px; animation: auth-spin 0.8s linear infinite; }
.auth-checking .auth-spin { margin-right: 0; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.acc-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--ink); }
.acc-btn b { font-weight: 500; } .acc-btn small { color: var(--ink-2); }
.acc-role { display: inline-block; font-size: 10px; letter-spacing: 0.15em; padding: 1px 6px; border: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.acc-role.is-admin { border-color: var(--accent); color: var(--accent); }
.account-bar { position: relative; }
.acc-menu { position: absolute; top: calc(100% + 6px); left: 0; right: auto; z-index: 60; min-width: 280px; background: #fff; border: 1px solid var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,0.12); display: flex; flex-direction: column; }
.acc-menu[hidden] { display: none; }
.acc-menu.flip { left: auto; right: 0; }   /* 画面の右端からはみ出すときは右寄せ */
.acc-menu-head { padding: 10px 14px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line); word-break: break-all; }
.acc-menu button { text-align: left; border: 0; background: transparent; padding: 11px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.acc-menu button:hover { background: var(--paper-2); } .acc-menu button.danger { color: #8a2f25; }
.auth-dialog .dlg-body .field { margin-bottom: 14px; }
.auth-dialog .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.btn.danger-fill { background: #8a2f25; border-color: #8a2f25; } .btn.danger-fill:hover { background: #b4463a; border-color: #b4463a; }
.dlg-msg { margin-top: 12px; }
.acct-card { max-width: 1040px; }
.acct-tools { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.acct-tools > div { display: flex; gap: 8px; flex-wrap: wrap; }
.temp-pw { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.temp-pw code { font-size: 26px; letter-spacing: 0.18em; padding: 10px 16px; border: 1px solid var(--ink); background: #fffaf3; font-family: "SF Mono", Menlo, Consolas, monospace; user-select: all; }
.acct-issue { border: 1px dashed var(--line); padding: 12px 14px; margin: 10px 0 16px; background: #fff; }
.acct-issue > b { display: block; font-size: 13px; letter-spacing: 0.1em; margin-bottom: 6px; }
.acct-issue-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 0.7fr auto; gap: 10px 12px; align-items: end; }
.acct-issue-row .field { margin: 0; }
.acct-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acct-table th, .acct-table td { padding: 8px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.acct-table th { font-size: 11px; letter-spacing: 0.12em; color: var(--ink-2); font-weight: 500; }
.acct-table tr.is-me { background: #fffaf3; }
.acct-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.acct-acts .btn { padding: 4px 8px; font-size: 11.5px; letter-spacing: 0.04em; }
.acct-table .tag { display: inline-block; font-size: 10px; letter-spacing: 0.15em; padding: 1px 7px; border: 1px solid var(--warn); color: var(--warn); vertical-align: middle; }
.tag-ok { border-color: #4e7d5b; color: #4e7d5b; } .tag-stop { border-color: #8a2f25; color: #8a2f25; }
@media (max-width: 760px) { .acct-issue-row { grid-template-columns: 1fr 1fr; } .acct-table th:nth-child(5), .acct-table td:nth-child(5) { display: none; } }
.tour-ctl .bright { gap: 6px; }
.tour-ctl .bright input { width: 110px; }
.tour-ctl .bright .btn { padding: 4px 8px; font-size: 11px; }

/* 各項目の自由入力 */
.field.has-free { position: relative; }
.field .free-btn { position: absolute; right: 0; top: -2px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12px; line-height: 1; padding: 3px 6px; cursor: pointer; border-radius: 2px; }
.field .free-btn:hover, .field.free-on .free-btn { color: var(--accent); border-color: var(--accent); }
.field .free-inline { margin-top: 6px; font-size: 13px; border-bottom: 1px dashed var(--accent) !important; }
.field .free-inline[hidden] { display: none; }
.tour-ctl .btn.is-on[data-t=pause] { background: var(--accent); color: #fff; border-color: var(--accent); }
.tour-dpad button:disabled { opacity: 0.35; cursor: default; }

/* ---------- AIパース（写真風）・AI設定 ---------- */
.ai-block { margin-bottom: 26px; padding: 16px 18px 12px; border: 1px solid var(--line); background: linear-gradient(180deg, #faf8f3, #fff); }
.ai-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-head h4 { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.ai-head h4 .en { font-family: var(--label); font-size: 10px; letter-spacing: 0.3em; color: var(--muted); }
.ai-head .ai-actions { margin-left: auto; display: flex; gap: 8px; }
.ai-status { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; min-height: 20px; }
.ai-status .ng { color: var(--ng); }
.ai-grid.stills { gap: 14px; }
.ai-grid .still.ai img { aspect-ratio: 3 / 2; }
.ai-grid .still.ai figcaption small { display: block; font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); margin-top: 2px; }
.ai-grid .still.is-stale img { opacity: 0.45; filter: grayscale(0.6); }
.ai-empty { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); line-height: 1.8; padding: 16px 18px; border: 1px dashed var(--line); background: #fff; }
.ai-block.is-busy .ai-actions .btn { opacity: 0.6; }
.stills-head { margin-top: 6px; display: flex; align-items: baseline; gap: 10px; }
.stills-head .en { font-family: var(--label); font-size: 10px; letter-spacing: 0.3em; color: var(--muted); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ai-spin 0.8s linear infinite; vertical-align: middle; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.cmp-thumb, .sel-img { position: relative; }
.cmp-thumb img, .sel-img.ai img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-tag { position: absolute; left: 8px; top: 8px; font-family: var(--label); font-size: 9.5px; letter-spacing: 0.2em; color: #fff; background: rgba(28,28,26,0.65); padding: 3px 8px; pointer-events: none; }
.ai-settings .grid { padding: 10px 0 4px; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.ai-settings .field.full { grid-column: 1 / -1; }
.ai-settings .ai-cost { padding: 10px 12px; background: #fff; border: 1px solid var(--line); }
.ai-settings .ai-test img { max-width: 220px; }
@media print { .ai-grid.stills { grid-template-columns: repeat(3, 1fr); } .ai-empty { display: none; } .ai-block { border: 0; padding: 0; background: none; } }
@media (max-width: 640px) { .ai-settings .grid { grid-template-columns: 1fr; } .ai-head .ai-actions { margin-left: 0; } }

/* 項目ごとのチェック */
.ic-box { margin-top: 14px; }
.ic-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ic-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ic-group { border: 1px solid var(--line); margin-bottom: 8px; background: #fff; }
.ic-group summary { cursor: pointer; padding: 8px 12px; font-size: 13px; letter-spacing: 0.06em; display: flex; justify-content: space-between; }
.ic-group summary small { color: var(--ink-2); }
.ic-table { margin: 0; } .ic-table th { width: 260px; padding-left: 12px; } .ic-table th small { display: block; color: var(--ink-2); font-weight: 400; font-size: 11.5px; } .ic-table td { padding-right: 12px; }
.ic-result th small { color: var(--ink-2); }
.decided { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--accent); color: var(--accent); font-size: 11px; letter-spacing: 0.08em; }
@media (max-width: 820px) { .ic-table th { width: 46%; } }

.v-add { color: var(--accent); border-color: var(--accent); } .cmp-verdicts .v-add { background: var(--accent); }

.sim-note { font-size: 12px; color: var(--ink-2); margin: 6px 0 0; letter-spacing: 0.04em; }

.parsed-live { margin: 14px 0 10px; padding: 12px 14px; border: 1px dashed var(--accent); background: #fff; }
.parsed-live b { font-size: 13px; letter-spacing: 0.08em; margin-right: 8px; }
.parsed-live ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }

.free-chip-wrap { margin-top: 12px; }
.free-chip-cap { display: block; font-size: 12px; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; }
.free-chip { display: block; width: 100%; box-sizing: border-box; min-height: 64px; font-family: var(--sans); font-size: 14.5px; line-height: 1.7; padding: 10px 12px; border: 1px dashed var(--accent) !important; border-radius: 4px; background: #fffdf8; color: var(--ink); resize: vertical; overflow: hidden; }
.free-chip::placeholder { color: #a9a49a; }
.free-chip:focus { outline: none; border-style: solid !important; box-shadow: 0 0 0 2px rgba(138, 109, 59, 0.15); background: #fff; }
.free-chip-wrap.free-on .free-chip { background: #fffaf5; border-style: solid !important; }
.notes-box { margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--line); background: #fff; }
.notes-box h4 { margin: 0 0 6px; font-size: 12.5px; letter-spacing: 0.08em; color: var(--ink-2); }
.notes-box ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }

.sheet-client { font-size: 15px; } .sheet-client small { font-size: 11px; margin-left: 3px; color: var(--ink-2); }
.sheet-title { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.sheet-tags { display: block; margin: 4px 0 2px; } .sheet-tags .tag { margin-right: 4px; }
.tag-decided { border-color: var(--accent); color: var(--accent); }
.sheet-search { width: 100%; margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--line); font-size: 13px; }

/* 選択＋自由入力（常時表示） */
.field .free-inline { display: block; width: 100%; margin-top: 5px; font-size: 12.5px; padding: 6px 8px; border: 1px dashed var(--line) !important; border-radius: 3px; background: #fff; color: var(--ink); }
.field .free-inline::placeholder { color: #a9a49a; }
.field.free-on .free-inline { border-color: var(--accent) !important; background: #fffaf5; }
.field .free-btn { display: none; }

/* ご要望の反映チェック */
.honor-box { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; }
.honor-box h4 { margin: 0 0 6px; font-size: 12.5px; letter-spacing: 0.08em; color: var(--ink-2); }
.honor-box h4 small { font-weight: 400; margin-left: 8px; color: var(--ink-3, #777); }
table.honor { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.honor th, table.honor td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.honor thead th { font-size: 11px; color: var(--ink-3, #777); font-weight: 500; }
table.honor tbody th { font-weight: 500; width: 26%; }
table.honor td small { color: var(--ink-3, #777); }
table.honor .h-mark { text-align: center; width: 28px; font-weight: 700; }
table.honor tr.h-ok .h-mark { color: #2e7d4f; }
table.honor tr.h-near .h-mark { color: #b07a1a; }
table.honor tr.h-ng .h-mark { color: #b3261e; }
table.honor tr.h-ng td, table.honor tr.h-ng th { background: #fff5f4; }
.sheet-io { display: flex; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
