/* ==========================================================================
   かんたん自動見積もり（page-estimate.php / assets/js/pages/estimate.js）
   ========================================================================== */
.est { padding: clamp(64px, 8vw, 112px) clamp(20px, 5vw, 40px) clamp(96px, 11vw, 160px); background: var(--paper); }
.est__inner { max-width: 1200px; margin: 0 auto; }
.est__intro { max-width: 720px; }
.est__intro p { margin: 0; font-size: 16px; line-height: 2; color: var(--text); }
.est__note { margin-top: 8px !important; font-size: 13px !important; color: var(--text-muted) !important; }

.est__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
@media (max-width: 959.98px) { .est__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 左: 条件 ---------- */
.est__form { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 56px); }
.est-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.est-step__title { display: flex; align-items: baseline; gap: 14px; padding: 0; font-family: var(--font-serif-ja); font-weight: 500; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: 0.04em; }
.est-step__num { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.5em; line-height: 1; color: var(--gold-deep); }
.est-step__desc { margin: 10px 0 0; font-size: 14px; line-height: 1.8; color: var(--text-muted); }

.est-pages { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.est-pages__btn { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--gold-deep); background: #FBFAF6; color: var(--gold-deep); font-size: 22px; line-height: 1; cursor: pointer; transition: background 0.3s; }
.est-pages__btn:hover, .est-pages__btn:focus-visible { background: rgba(201, 169, 110, 0.15); }
.est-pages__field { display: flex; align-items: baseline; gap: 8px; }
.est-pages__field input { width: 84px; height: 56px; padding: 0 8px; border: 1px solid rgba(26, 26, 31, 0.25); border-radius: 8px; background: #fff; text-align: center; font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--text); }
.est-pages__field span { font-size: 15px; }
.est-tiers { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; line-height: 1.9; color: var(--text-muted); }

.est-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 18px; }
.est-choice { position: relative; display: flex; gap: 14px; padding: 18px 18px 18px 16px; border: 1px solid rgba(26, 26, 31, 0.16); border-radius: 8px; background: #FBFAF6; cursor: pointer; transition: border-color 0.3s, background 0.3s; }
.est-choice:hover { border-color: var(--gold-deep); }
.est-choice input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: #7E6334; }
.est-choice:has(input:checked) { border-color: var(--gold-deep); background: #F3EBDA; }
.est-choice:has(input:focus-visible) { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.est-choice__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.est-choice__name { font-size: 15px; font-weight: 500; line-height: 1.6; }
.est-choice__desc { font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.est-choice__price { margin-top: 2px; font-size: 13px; color: var(--gold-deep); font-weight: 500; }

.est-reset { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- 右: 結果 ---------- */
.est-result { position: sticky; top: 96px; padding: clamp(28px, 3vw, 40px); border-radius: 8px; background: var(--ink); color: var(--paper); scroll-margin-top: 96px; }
@media (max-width: 959.98px) { .est-result { position: static; } }
.est-result { max-height: calc(100vh - 120px); overflow: auto; }
@media (max-width: 959.98px) { .est-result { max-height: none; } }
.est-result__label { font-family: Inter, sans-serif; font-size: 10px; letter-spacing: 0.28em; color: var(--gold); }
.est-result__main { margin: 18px 0 0; }
.est-result__main > div { padding: 16px 0; border-bottom: 1px solid rgba(201, 169, 110, 0.25); }
.est-result__main dt { font-size: 13px; color: #B4B8CB; }
.est-result__main dd { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.est-result__main dd > span[data-out] { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px, 3.6vw, 46px); line-height: 1; color: var(--gold-light); }
.est-result__main small { font-size: 13px; color: #D3D6E3; }
.est-result__ex { width: 100%; font-size: 12px; color: #9EA3B8; }
.est-result__total dd > span[data-out] { font-size: clamp(28px, 2.8vw, 34px) !important; color: var(--paper) !important; }
.est-result__details { margin-top: 18px; }
.est-result__details summary { cursor: pointer; font-size: 14px; color: var(--gold-light); }
.est-list { list-style: none; margin: 12px 0 0; padding: 0; }
.est-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(201, 169, 110, 0.2); font-size: 13px; line-height: 1.6; }
.est-list__name { color: #E9E6DD; }
.est-list__val { flex: none; color: #D3D6E3; text-align: right; }
.est-result__cta-note a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.est-notes { max-width: 860px; margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid rgba(126, 99, 52, 0.45); }
.est-notes__title { margin: 0; font-family: var(--font-serif-ja); font-weight: 500; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: 0.04em; }
.est-notes__list { margin: 20px 0 0; padding: 0 0 0 1.2em; font-size: 14px; line-height: 1.9; color: var(--text-muted); }
.est-notes__list li + li { margin-top: 6px; }
.est-result__cta { width: 100%; justify-content: center; margin-top: 24px; }
.est-result__cta-note { margin: 10px 0 0; font-size: 12px; color: #9EA3B8; text-align: center; }

/* スマホ: 画面下に金額を固定表示 */
.est-mobilebar { display: none; }
@media (max-width: 959.98px) {
  .est.is-ready .est-mobilebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); font-size: 13px; box-shadow: 0 -8px 24px rgba(11, 16, 38, 0.25); }
  .est-mobilebar a { flex: none; color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
  .page-estimate .sp-fixed-cta { display: none !important; }
}

/* ---------- 業種別のおすすめ ---------- */
.est-presets { padding: 20px; border: 1px dashed rgba(126, 99, 52, 0.45); border-radius: 8px; }
.est-presets__title { margin: 0; font-size: 14px; line-height: 1.8; }
.est-presets__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.est-presets__btn { min-height: 44px; padding: 0 16px; border: 1px solid rgba(126, 99, 52, 0.45); border-radius: 999px; background: #FBFAF6; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.est-presets__btn:hover, .est-presets__btn:focus-visible { border-color: var(--gold-deep); }
.est-presets__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.est-result__print { display: block; width: 100%; margin-top: 12px; padding: 10px 0; border: 1px solid rgba(201, 169, 110, 0.4); border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--gold-light); cursor: pointer; }

/* ---------- 印刷（見積もりの内容だけを出す） ---------- */
@media print {
  .site-header, .site-footer, .sp-fixed-cta, .page-hero, .cta-section, .est-presets, .est-reset, .est-mobilebar, .est-result__cta, .est-result__cta-note, .est-result__print { display: none !important; }
  .est { padding: 0; }
  .est__grid { grid-template-columns: 1fr; }
  .est-result { position: static; background: #fff; color: #000; border: 1px solid #999; }
  .est-result *, .est-result__main dd > span[data-out] { color: #000 !important; }
  .est-choice:not(:has(input:checked)) { display: none; }
}
