/* ==========================================================================
   /simulation/（売却シミュレーション）専用スタイル
   assets/css/simulation.css
   --------------------------------------------------------------------------
   ・設置先：/assets/css/simulation.css
   ・読み込み：functions.php で page-hys-simulation.php のときだけ enqueue。
     依存に 'hys-top'（= assets/css/style.css）を指定しているため、
     必ず style.css の後に読み込まれ、カスケード順が保たれます。
   ・トークン（--green / --brass / --paper / --line / --alert 等）は
     style.css の :root が唯一の定義元です。ここでは定義しません。
   ・共通クラス（.block / .wrap / .eyebrow / .disp / .lead / .spec /
     .qbox / .close-line / .page-hero / .cta-band / .btn-dark など）は
     style.css を継承します。このファイルには本ページ固有のものだけ。
   ========================================================================== */

/* ==========================================================================
   前提条件（0）見出し＋外観写真の2カラム（.cond-top）
   --------------------------------------------------------------------------
   左に「Conditions／こういう物件があります。」＋リード、
   右に対象物件の外観写真を置きます。トップページの .why-top と同じ
   （1fr ＋ 420px）の骨格に揃え、ページ間で写真まわりの見え方を統一。
   写真は assets/img/sim_exterior.jpg を background で敷いています。
   差し替える場合はこのファイルの url() を変更してください。
   ========================================================================== */
.hys-top .cond-top{
  display:grid;grid-template-columns:1fr 420px;gap:44px;align-items:start;
}
.hys-top .cond-photo{
  width:420px;aspect-ratio:4/3;
  background:url("../img/sim_exterior.jpg") center/cover no-repeat;
  border:1px solid var(--line);border-radius:4px;
}

/* ==========================================================================
   前提条件（1）対象物件（.prop）
   --------------------------------------------------------------------------
   所在地・土地面積・現況は「物件ひとつ分の情報」なので、
   カードを分けず1枠にまとめ、中を縦罫で3分割しています。
   下の .prem-card と同じ体裁にすることで、
   「物件 → 売主 → 買主」の3枚が一続きのまとまりとして読めます。
   ※ 上端のアクセントラインは付けません。3枚とも太線が並ぶと線が主張しすぎるため、
     色のアクセントは .prem-card（売主＝真鍮／買主＝深緑）だけに持たせ、
     このカードは細罫のみで受けています。
   ※ style.css の .spec（4列グリッド）はこのページでは使いません。
   ========================================================================== */
.hys-top .prop{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:4px;
  padding:24px 28px;
  margin-top:40px;
}
.hys-top .block.alt .prop{background:var(--paper)}
.hys-top .prop-lb{
  display:inline-block;
  font-size:11.5px;font-weight:500;letter-spacing:.08em;
  color:var(--paper);background:var(--ink);
  padding:5px 12px;border-radius:3px;
}
.hys-top .prop-list{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px;
}
.hys-top .prop-list > div{padding:0 26px}
.hys-top .prop-list > div:first-child{padding-left:0}
.hys-top .prop-list > div:last-child{padding-right:0}
.hys-top .prop-list > div + div{border-left:1px solid var(--line)}
.hys-top .prop-list dt{
  font-size:12.5px;font-weight:500;letter-spacing:.06em;color:var(--muted);
}
.hys-top .prop-list dd{
  font-family:var(--mincho);font-weight:600;font-size:17.5px;line-height:1.55;
  letter-spacing:.03em;color:var(--green);margin-top:8px;
}

/* ==========================================================================
   前提条件（2）売主側／買主側の前提（.prem）
   --------------------------------------------------------------------------
   「売却希望額 1億5,000万円」と「総予算 4億円」を左右に大きく並べ、
   買主の内訳（希望する建物・建物代・造園費）は .prem-sub でサブ扱いにします。
   パッと見て2つの数字だけが目に入る＝この後の失敗／成功パターンが読める、
   という設計です。
   ========================================================================== */
.hys-top .prem{
  display:grid;grid-template-columns:1fr 1fr;gap:16px;
  align-items:start;margin-top:16px;
}
.hys-top .prem-card{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:4px;
  padding:26px 28px 24px;
}
.hys-top .block.alt .prem-card{background:var(--paper)}
/* 上端のアクセント：売主＝真鍮／買主＝深緑 */
.hys-top .prem-card.seller{border-top:3px solid var(--brass)}
.hys-top .prem-card.buyer{border-top:3px solid var(--green)}

/* 見出しラベル（.spec の .t と同じ体裁で統一） */
.hys-top .prem-lb{
  display:inline-block;
  font-size:11.5px;font-weight:500;letter-spacing:.08em;
  color:var(--paper);background:var(--green);
  padding:5px 12px;border-radius:3px;
}
.hys-top .prem-card.seller .prem-lb{background:var(--brass)}

/* 主役の金額 */
.hys-top .prem-main{
  display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-top:18px;
}
.hys-top .prem-main .pt{
  font-size:13px;font-weight:500;letter-spacing:.06em;color:var(--muted);
}
.hys-top .prem-main .pv{
  font-family:var(--num);font-weight:500;font-size:32px;letter-spacing:.02em;
  color:var(--green);line-height:1.3;
}

/* 売主カードの補足一行 */
.hys-top .prem-note{
  font-size:13px;line-height:1.9;color:var(--muted);letter-spacing:.02em;
  margin-top:18px;padding-top:15px;border-top:1px dashed var(--line);
}

/* 買主カードの内訳（サブ情報） */
.hys-top .prem-sub{
  list-style:none;
  margin-top:18px;padding-top:15px;border-top:1px dashed var(--line);
  display:flex;flex-direction:column;gap:11px;
}
.hys-top .prem-sub li{
  display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;line-height:1.8;
}
.hys-top .prem-sub .st{
  flex:0 0 auto;min-width:8em;
  font-size:12.5px;letter-spacing:.04em;color:var(--muted);
}
.hys-top .prem-sub b{
  font-family:var(--sans);font-weight:700;font-size:14px;
  color:var(--green);letter-spacing:.03em;
}
/* 数字の値だけ Jost に（和文が混じる値は .n を付けない） */
.hys-top .prem-sub b.n{
  font-family:var(--num);font-weight:500;font-size:17px;letter-spacing:.02em;
}
/* 坪単価などの但し書き。改行して1行占有させる */
.hys-top .prem-sub em{
  flex:1 1 100%;font-style:normal;
  font-size:11.5px;line-height:1.7;letter-spacing:.01em;color:var(--muted);
}

/* 前提のまとめ（引き算のロジック） */
.hys-top .prem-lead{
  font-size:15px;line-height:2;color:var(--body);letter-spacing:.02em;
  margin-top:26px;max-width:760px;
  border-left:3px solid var(--brass-soft);padding-left:20px;
}
.hys-top .prem-lead b{color:var(--green);font-weight:700}

/* ==========================================================================
   パターン見出し（× 失敗 ／ ✓ 成功）
   ========================================================================== */
.hys-top .pat-head{display:flex;align-items:flex-start;gap:20px}
.hys-top .pat-mark{
  flex:0 0 auto;width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--sans);font-size:21px;font-weight:700;line-height:1;color:#fff;
  margin-top:4px;
}
.hys-top .pat-head.bad .pat-mark{background:var(--alert)}
.hys-top .pat-head.good .pat-mark{background:var(--green)}
.hys-top .pat-head .eyebrow{margin-bottom:14px}
.hys-top .pat-head.bad .eyebrow{color:var(--alert)}
.hys-top .pat-head.bad .eyebrow::before{background:var(--alert)}

/* ==========================================================================
   シミュレーションの手順（.sim）
   --------------------------------------------------------------------------
   左に縦線を通し、各ステップの番号を線上に置いています。
   番号は CSS カウンタで自動採番するので、手順を増減しても振り直し不要です。
   ========================================================================== */
.hys-top .sim{
  counter-reset:simstep;
  list-style:none;
  margin-top:44px;
  padding-left:62px;
  position:relative;
}
.hys-top .sim::before{
  content:"";position:absolute;left:18px;top:8px;bottom:8px;
  width:1px;background:var(--line);
}
.hys-top .sim > li{position:relative;padding-bottom:38px}
.hys-top .sim > li:last-child{padding-bottom:0}
.hys-top .sim > li::before{
  counter-increment:simstep;
  content:counter(simstep,decimal-leading-zero);
  position:absolute;left:-62px;top:-2px;
  width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--num);font-weight:500;font-size:15px;line-height:1;
  letter-spacing:.04em;color:var(--brass);
  background:var(--paper);border:1px solid var(--brass-soft);
}
.hys-top .block.alt .sim > li::before{background:var(--paper-2)}
.hys-top .sim h4{
  font-family:var(--mincho);font-weight:600;font-size:21px;line-height:1.6;
  letter-spacing:.05em;color:var(--green);margin-bottom:9px;
}
.hys-top .sim p{
  font-size:15.5px;line-height:2;color:var(--muted);letter-spacing:.02em;
  max-width:660px;
}
.hys-top .sim p b{color:var(--green);font-weight:700}
.hys-top .sim .qbox{margin-top:26px;max-width:660px}
.hys-top .sim .qnote{
  margin-top:18px;font-size:14px;line-height:1.95;color:var(--muted);
}

/* --- 計算式（4億円 − 2億7,500万円 = …） --- */
.hys-top .sim .calc{
  font-family:var(--num);font-weight:500;font-size:22px;letter-spacing:.03em;
  color:var(--muted);line-height:1.6;display:flex;align-items:baseline;
  gap:10px;flex-wrap:wrap;margin-top:4px;
}
.hys-top .sim .calc .op{color:var(--brass-soft);font-size:19px}
.hys-top .sim .calc b{font-size:34px;font-weight:500;letter-spacing:.02em}
.hys-top .sim .calc .bad-amt{color:var(--alert)}
.hys-top .sim .calc .good-amt{color:var(--green)}

/* --- 結末の行 --- */
.hys-top .sim > li.out{
  border-radius:4px;padding:26px 28px 24px;margin-left:-8px;
}
.hys-top .sim > li.out::before{top:24px;left:-54px}
.hys-top .sim > li.out.bad{background:rgba(154,59,44,.07);border:1px solid rgba(154,59,44,.24)}
.hys-top .sim > li.out.good{background:var(--green);border:1px solid var(--green)}
.hys-top .sim > li.out + li.out{margin-top:14px}
.hys-top .sim > li.out.bad h4{color:var(--alert)}
.hys-top .sim > li.out.good h4{color:#FBF9F3}
.hys-top .sim > li.out.good p{color:rgba(242,238,228,.86)}
.hys-top .sim > li.out.good p b{color:var(--brass-soft)}
/* 失敗パターンの結末では、強調語（高額見積り・値引き額）を警告色で */
.hys-top .sim > li.out.bad p b{color:var(--alert)}

/* ==========================================================================
   見積もり行の追加バリエーション（.qbox は style.css で定義）
   ========================================================================== */
/* 解体・造成費のメーカー経由行（赤系で強調） */
.hys-top .qrow.alert{background:rgba(154,59,44,.08)}
.hys-top .qrow.alert .qlb{color:var(--alert);font-weight:700}
.hys-top .qrow.alert .qamt{color:var(--alert)}
/* ルート名の小さな添え書き */
.hys-top .qlb .rt{
  display:block;font-size:12px;font-weight:400;letter-spacing:.04em;
  color:var(--muted);margin-top:3px;
}
.hys-top .qrow.key .qlb .rt{color:rgba(242,238,228,.72)}
.hys-top .qrow.alert .qlb .rt{color:var(--alert);opacity:.8}

/* --- 警告バッジ（.qrow.alert の項目名の中に置く） --------------------------
   「解体・造成費用」欄そのものの注釈として、ルート名（.rt）の下に差し込みます。
   行の外に出すと独立した見出しに見えてしまうため、あくまで欄内の添え書き。
   注意マークは絵文字を使わず、丸＋「!」をCSSで描いています
   （端末による見え方の差をなくすため。.pat-mark / .bud-lb .mk と同じ作り）。 */
.hys-top .qflag{
  display:inline-flex;align-items:center;gap:7px;
  margin-top:10px;padding:5px 12px 5px 8px;border-radius:3px;
  background:var(--alert);color:#FBF9F3;
  font-family:var(--sans);font-size:12.5px;font-weight:700;
  letter-spacing:.06em;line-height:1.4;
}
.hys-top .qflag .ic{
  flex:0 0 auto;width:17px;height:17px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#FBF9F3;color:var(--alert);
  font-size:12px;font-weight:700;line-height:1;letter-spacing:0;
}
.hys-top .qflag-note{
  display:block;margin-top:7px;
  font-family:var(--sans);font-size:11.5px;font-weight:400;
  letter-spacing:.02em;line-height:1.7;color:var(--alert);opacity:.85;
}

/* ==========================================================================
   予算の分かれ方（積み上げバー）
   --------------------------------------------------------------------------
   バーの全幅＝買主の総予算4億円。左が土地予算、右が建築費です。
   .bud-line は「売主様の希望価格」の位置に立てる破線で、
   left の % は［希望価格 ÷ 総予算］。金額を変える場合はここも要調整です。
   ========================================================================== */
.hys-top .budget{margin-top:44px}
.hys-top .bud-track{position:relative}
.hys-top .bud-item + .bud-item{margin-top:34px}
.hys-top .bud-lb{
  font-family:var(--sans);font-weight:700;font-size:15px;letter-spacing:.06em;
  color:var(--green);display:flex;align-items:center;gap:10px;margin-bottom:12px;
}
.hys-top .bud-lb .mk{
  width:22px;height:22px;border-radius:50%;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;line-height:1;color:#fff;
}
.hys-top .bud-lb .mk.bad{background:var(--alert)}
.hys-top .bud-lb .mk.good{background:var(--green)}

.hys-top .bud-bar{display:flex;height:52px;border:1px solid var(--line);overflow:hidden;background:var(--paper)}
.hys-top .seg{height:100%}
.hys-top .seg.land{background:var(--brass)}
.hys-top .seg.build{background:var(--green);opacity:.86}

.hys-top .bud-legend{display:flex;flex-wrap:wrap;gap:10px 28px;margin-top:12px}
.hys-top .lg{
  font-size:13.5px;letter-spacing:.02em;color:var(--muted);
  display:flex;align-items:center;gap:8px;
}
.hys-top .lg::before{content:"";width:11px;height:11px;flex:0 0 auto}
.hys-top .lg.land::before{background:var(--brass)}
.hys-top .lg.build::before{background:var(--green);opacity:.86}
.hys-top .lg b{font-family:var(--num);font-weight:500;font-size:16px;color:var(--green);letter-spacing:.02em}

/* 希望価格ライン */
.hys-top .bud-line{
  position:absolute;top:26px;bottom:34px;
  border-left:2px dashed var(--brass);
  pointer-events:none;
}
.hys-top .bud-line span{
  position:absolute;left:10px;bottom:-6px;white-space:nowrap;
  font-size:12.5px;font-weight:500;letter-spacing:.04em;color:var(--brass);
  background:var(--paper-2);padding:2px 8px;
}

/* 注記 */
.hys-top .finenote{font-size:12px;line-height:1.85;color:var(--muted);letter-spacing:.01em;margin-top:24px}
.hys-top .finenote a{color:var(--brass);text-decoration:underline}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media(max-width:1080px){
  /* 前提条件：見出しと写真を縦積みに */
  .hys-top .cond-top{grid-template-columns:1fr;gap:26px}
  .hys-top .cond-photo{width:100%;max-width:520px}
}
@media(max-width:820px){
  /* 対象物件：縦罫3分割 → 横罫で積み上げ、項目名と値を左右に */
  .hys-top .prop{padding:22px 22px}
  .hys-top .prop-list{grid-template-columns:1fr;margin-top:14px}
  .hys-top .prop-list > div{
    padding:12px 0;display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;
  }
  .hys-top .prop-list > div:first-child{padding-top:0}
  .hys-top .prop-list > div:last-child{padding-bottom:0}
  .hys-top .prop-list > div + div{border-left:0;border-top:1px solid var(--line)}
  .hys-top .prop-list dt{flex:0 0 auto;min-width:6em}
  .hys-top .prop-list dd{margin-top:0;font-size:16.5px}

  .hys-top .prem{grid-template-columns:1fr;gap:14px}
  .hys-top .prem-card{padding:22px 22px 20px}
  .hys-top .prem-main{margin-top:15px;gap:12px}
  .hys-top .prem-main .pv{font-size:27px}
  .hys-top .prem-sub .st{min-width:7.5em;font-size:12px}
  .hys-top .prem-lead{font-size:14.5px;margin-top:22px;padding-left:16px}

  .hys-top .pat-head{gap:14px}
  .hys-top .pat-mark{width:38px;height:38px;font-size:18px}

  .hys-top .sim{padding-left:46px;margin-top:34px}
  .hys-top .sim::before{left:14px}
  .hys-top .sim > li{padding-bottom:30px}
  .hys-top .sim > li::before{left:-46px;width:30px;height:30px;font-size:13px}
  .hys-top .sim h4{font-size:18px}
  .hys-top .sim p{font-size:14.5px}
  .hys-top .sim > li.out{padding:22px 20px 20px;margin-left:0}
  .hys-top .sim > li.out::before{top:20px;left:-46px}
  .hys-top .sim .calc{font-size:17px;gap:7px}
  .hys-top .sim .calc b{font-size:26px}

  .hys-top .qflag{font-size:12px;letter-spacing:.04em;padding:4px 10px 4px 7px;margin-top:9px}
  .hys-top .qflag .ic{width:16px;height:16px;font-size:11px}
  .hys-top .qflag-note{font-size:11px;margin-top:6px}

  .hys-top .bud-bar{height:42px}
  .hys-top .bud-legend{gap:8px 18px}
  .hys-top .lg{font-size:12.5px}
  .hys-top .lg b{font-size:15px}
  /* 破線ラベルは重なりやすいので、バーの上側へ逃がす */
  .hys-top .bud-line{top:22px;bottom:30px}
  .hys-top .bud-line span{font-size:11.5px;padding:2px 6px;left:6px}
}

@media(max-width:560px){
  .hys-top .prop-list dd{font-size:15.5px}
  .hys-top .prem-main .pv{font-size:25px}
  /* 内訳は「項目名／値」を上下に積む */
  .hys-top .prem-sub li{gap:4px 10px}
  .hys-top .prem-sub .st{flex:1 1 100%;min-width:0}

  /* 計算式は1行に収まらないため、答えを次の行に落とす */
  .hys-top .sim .calc{display:block;line-height:2}
  .hys-top .sim .calc b{display:block;margin-top:6px}
  .hys-top .bud-legend{flex-direction:column;gap:7px}
}
