/* 第6段階：4案の文字組み、料金UI、初回演出。計算・本文とは分離。 */
.brand{gap:0}
.brand b{line-height:1.28}
.footer-brand{font-weight:800;letter-spacing:.02em}
.theme-m3 .brand b,.theme-m3 .footer-brand{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;font-weight:800;letter-spacing:.02em}
.theme-p3 .brand b,.theme-p3 .footer-brand{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-weight:600;letter-spacing:.09em}
.theme-m4 .brand b,.theme-m4 .footer-brand{font-family:Arial,"Hiragino Kaku Gothic ProN",sans-serif;font-weight:800;letter-spacing:.025em}
.theme-m5 .brand b,.theme-m5 .footer-brand{font-family:Arial,"Hiragino Kaku Gothic ProN",sans-serif;font-weight:900;letter-spacing:-.045em}
.theme-m4 .brand small{letter-spacing:.14em}
.theme-m5 .brand small{letter-spacing:.08em}
.modern-hero-title{grid-template-columns:1fr;padding-left:clamp(0px,7vw,100px)}
.modern-coordinate .coordinate-label{margin-left:-28px;white-space:nowrap}
/* 料金ページは概算を冒頭へ */
.pricing-hero{padding:clamp(40px,5vw,72px) 0;background:var(--soft);position:relative;overflow:hidden}
.pricing-hero .wrap{position:relative;z-index:1}
.pricing-hero .eyebrow{margin-bottom:12px}
.pricing-hero h1{font-size:clamp(38px,4.3vw,66px);line-height:1.2;letter-spacing:-.055em;margin:0 0 10px}
.pricing-hero .lead{max-width:770px;font-size:15px;line-height:1.75;margin:0}
.theme-p3 .pricing-hero{background:#eae2d5}
.theme-p3 .pricing-hero h1{font-family:var(--serif);font-weight:500;letter-spacing:.02em}
.theme-m4 .pricing-hero{background:#0b2234;color:#fff;background-image:linear-gradient(#4de0d215 1px,transparent 1px),linear-gradient(90deg,#4de0d215 1px,transparent 1px);background-size:64px 64px}
.theme-m4 .pricing-hero .lead{color:#bfd8e1}
.theme-m5 .pricing-hero{background:#e8e1d5}
.theme-m5 .pricing-hero h1{font-size:clamp(43px,5.2vw,76px);font-weight:900;letter-spacing:-.08em}
.theme-m5 .pricing-hero:after{content:"";position:absolute;right:0;bottom:0;width:27%;height:7px;background:#d0442e}
.estimate-section{padding-top:34px!important}
.estimate-section .estimate-shell{margin:0}
.estimator-v4{padding:clamp(18px,2.5vw,34px)}
.est-header{padding-bottom:13px}
.est-header h2,.theme-m4 .est-header h2,.theme-m5 .est-header h2{font-size:clamp(25px,2.7vw,37px);letter-spacing:-.04em;line-height:1.3;margin:0 0 3px}
.est-header>p:last-child{font-size:13px}
.est-category{margin:17px 0 22px}
.est-category button{min-height:45px;padding:7px 19px}
.est-service-heading{font-size:17px;margin:0 0 10px}
.est-main{gap:4%}
.est-service-list{gap:6px}
.est-service-card,.theme-m5 .est-service-card{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:10px 14px;text-align:left;grid-template-columns:none}
.est-service-name{font-size:14px;font-weight:800;line-height:1.45}
.est-service-card.is-active{border-width:2px}
.theme-m4 .est-service-card{clip-path:none}
.theme-m4 .est-service-card.is-active{box-shadow:none}
.theme-m5 .est-service-list{display:block}
.theme-m5 .est-service-card{min-height:52px;padding:10px 3px}
.theme-m5 .est-service-name{font-size:16px}
.theme-m5 .est-service-card.is-active{padding-left:10px}
.est-conditions{margin-top:19px;padding-top:17px}
.est-subhead{align-items:center;margin-bottom:13px}
.est-subhead h3,.theme-p3 .est-subhead h3{font-size:17px;font-family:inherit;font-weight:800}
.est-field{margin-bottom:15px}
.est-field legend,.theme-p3 .est-field legend{font-family:inherit;font-size:14px;font-weight:800;margin-bottom:7px}
.est-field legend span{font:700 11px Arial,sans-serif;color:var(--accent)}
.est-field-help{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 8px}
.est-option{min-height:48px;padding:8px 10px}
.est-option span{font-size:12px}
.est-option small{margin-top:1px;font-size:10px}
.est-result{top:102px}
.est-result-inner,.est-result-empty{padding:clamp(18px,2vw,27px)}
.est-result-empty{min-height:110px;display:flex;align-items:center}
.est-result-empty p{font-weight:700;margin:0;color:var(--muted)}
.est-result h3{font-size:21px;margin-bottom:12px}
.est-result-inner>.eyebrow{margin-bottom:6px}
.est-money{margin-bottom:9px;padding:13px 15px}
.est-money strong{font-size:clamp(28px,2.8vw,39px)}
.est-money.range strong{font-size:clamp(21px,2.1vw,29px)}
.est-disclaimer{font-size:11px;line-height:1.55;padding:8px 10px;margin:0 0 13px}
.est-detail-toggle{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:15px}
.est-detail-toggle summary{cursor:pointer;padding:11px 2px;font-size:13px;font-weight:800;list-style-position:inside}
.est-detail-toggle summary:hover{color:var(--accent)}
.est-detail-toggle[open] summary{border-bottom:1px solid var(--line)}
.est-detail-toggle .est-breakdown{border:0;margin:0;padding:8px 0}
.est-detail-toggle .est-selected{margin:0;padding:12px 0;border-top:1px solid var(--line)}
.est-detail-toggle .est-selected h4{font-size:12px}
.est-detail-note{font-size:11px;line-height:1.65;color:var(--muted);margin:0 0 13px}
.est-next,.est-result-foot{display:none}
.est-contact{margin-top:17px}
.theme-m4 .estimator-v4{padding:clamp(18px,2.5vw,34px)}
.theme-m4 .est-service-card{min-height:52px}
.theme-m4 .est-money{padding:15px}
.theme-m5 .est-header h2{font-weight:900}
.theme-m5 .est-category{margin:15px 0 20px}
.theme-m5 .est-category button{min-height:45px;font-size:15px}
.theme-m5 .est-result .est-disclaimer{color:#e0dbcf}
.theme-m5 .est-result-empty{background:#20221f;color:#fff}
.theme-m5 .est-result-empty p{color:#ddd}
.theme-m5 .est-detail-note{color:#d5d1c8}
.theme-m5 .est-money strong{font-size:clamp(30px,3.2vw,47px)}
.theme-m5 .est-money.range strong{font-size:clamp(21px,2.2vw,31px)}
/* M4/M5本文の見出しはデザインの大きさを保ちつつ改行を自然に */
.theme-m5 .modern-page-hero h1{font-size:clamp(52px,5.6vw,84px)}
.theme-m5 .modern-page-hero .page-hero-copy{min-width:0}
/* 初回オープニング。DOM追加失敗時は通常のページがそのまま見える。 */
.opening{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;overflow:hidden;pointer-events:none;opacity:1;transition:opacity .24s ease;background:#fff;color:#18383d}
.opening.is-leaving{opacity:0}
.opening-center{position:relative;z-index:2;text-align:center;max-width:calc(100% - 34px)}
.opening-center p{font-size:clamp(20px,3vw,37px);font-weight:800;letter-spacing:.045em;line-height:1.4;margin:10px 0 4px;opacity:0;transform:translateY(12px)}
.opening-center small{display:block;font-size:11px;letter-spacing:.2em;opacity:0}
.opening-line{display:block;width:min(270px,55vw);height:2px;margin:auto;transform:scaleX(0);transform-origin:left;background:currentColor}
.opening.is-active .opening-line{animation:openingLine .55s ease both}
.opening.is-active .opening-center p{animation:openingText .45s .17s ease both}
.opening.is-active .opening-center small{animation:openingFade .4s .35s ease both}
.opening-m3{background:#f7f9f7;color:#236b68}
.opening-m3 .opening-center p{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN",sans-serif;letter-spacing:.03em}
.opening-p3{background:#f3eee5;color:#34443c}
.opening-p3 .opening-line{background:#8d7859;height:1px;transform-origin:center}
.opening-p3 .opening-center p{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-weight:500;letter-spacing:.14em}
.opening-m4{background:#061826;color:#4de0d2}
.opening-m4 .opening-center{margin-top:160px}
.opening-m4 .opening-center p{font-family:Arial,"Hiragino Kaku Gothic ProN",sans-serif;font-weight:800;letter-spacing:.045em}
.opening-survey{position:absolute;width:min(360px,70vw);top:calc(50% - 200px);left:50%;transform:translateX(-50%);fill:none;stroke:#4de0d2;stroke-width:2}
.opening-survey path{stroke-dasharray:950;stroke-dashoffset:950}
.opening-survey circle{fill:#4de0d2;opacity:0}
.opening-m4.is-active .opening-survey path{animation:surveyDraw .72s ease both}
.opening-m4.is-active .opening-survey circle{animation:openingFade .25s .45s both}
.opening-m5{background:#eae4d9;color:#20221f}
.opening-m5 .opening-image{position:absolute;inset:0 0 0 48%;background:url('../assets/m5-editorial-hero.jpg') center/cover;clip-path:inset(0 0 0 100%)}
.opening-m5.is-active .opening-image{animation:editorialMask .7s .05s ease both}
.opening-m5 .opening-large{position:absolute;top:22%;left:4%;font-size:clamp(55px,10vw,150px);font-weight:900;letter-spacing:-.09em;line-height:1.1;white-space:nowrap;clip-path:inset(0 100% 0 0)}
.opening-m5.is-active .opening-large{animation:editorialText .65s .12s ease both}
.opening-m5 .opening-center{align-self:end;margin-bottom:17vh;background:#eae4d9e8;padding:20px 25px}
.opening-m5 .opening-line{background:#d0442e}
@keyframes openingLine{to{transform:scaleX(1)}}
@keyframes openingText{to{opacity:1;transform:translateY(0)}}
@keyframes openingFade{to{opacity:1}}
@keyframes surveyDraw{to{stroke-dashoffset:0}}
@keyframes editorialMask{to{clip-path:inset(0)}}
@keyframes editorialText{to{clip-path:inset(0)}}
@media(max-width:900px){.theme-m5 .est-main{grid-template-columns:1fr}.est-result{position:static}}
@media(max-width:650px){
 .brand b{font-size:13px}
 .theme-p3 .brand b{font-size:13px}
 .theme-m4 .brand b,.theme-m5 .brand b{font-size:12px}
 .brand small{font-size:6px}
 .pricing-hero{padding:32px 0}
 .pricing-hero h1,.theme-m5 .pricing-hero h1{font-size:clamp(33px,8vw,44px)}
 .pricing-hero .lead{font-size:13px}
 .estimate-section{padding-top:18px!important}
 .estimator-v4,.theme-m4 .estimator-v4{padding:16px 13px}
 .est-header h2,.theme-m4 .est-header h2,.theme-m5 .est-header h2{font-size:25px}
 .est-category{margin:13px 0 16px}
 .est-category button{min-height:44px;padding:7px 8px;font-size:13px}
 .est-service-list{grid-template-columns:1fr 1fr}
 .est-service-card,.theme-m5 .est-service-card{min-height:48px;padding:8px 9px}
 .est-service-name,.theme-m5 .est-service-name{font-size:12px}
 .theme-m5 .est-service-list{display:grid;grid-template-columns:1fr 1fr;gap:0 7px}
 .theme-m5 .est-service-card{border-bottom:1px solid var(--line)}
 .theme-m5 .est-service-card.is-active{padding-left:9px}
 .est-main{gap:16px}
 .est-conditions{margin-top:15px}
 .est-option{min-height:47px}
 .est-result-inner,.est-result-empty{padding:15px}
 .est-money strong,.theme-m5 .est-money strong{font-size:clamp(27px,7.5vw,36px)}
 .est-money.range strong,.theme-m5 .est-money.range strong{font-size:clamp(19px,5.1vw,25px)}
 .modern-hero-title{padding-left:0}
 .theme-m5 .modern-page-hero h1{font-size:clamp(39px,9vw,52px)}
 .opening-m4 .opening-center{margin-top:130px}
 .opening-m5 .opening-large{top:28%;font-size:clamp(46px,12vw,75px)}
 .opening-m5 .opening-image{inset:23% 0 0 27%}
}
@media(max-width:360px){
 .theme-m4 .brand b,.theme-m5 .brand b{font-size:11px}
 .est-service-list,.theme-m5 .est-service-list{grid-template-columns:1fr}
 .est-service-card,.theme-m5 .est-service-card{min-height:44px}
 .est-money.range strong,.theme-m5 .est-money.range strong{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.opening{display:none!important}}
