/* Immersive case layout inspired by leading architecture editorial galleries. */
.case-detail .detail-hero{height:76vh;min-height:580px}
.case-detail .detail-hero:after{background:linear-gradient(0deg,rgba(8,8,7,.68),transparent 62%)}
.case-detail .detail-hero>div{left:6vw;bottom:72px}
.case-detail .detail-hero>div>p{font-size:11px;letter-spacing:.22em;text-transform:uppercase}
.case-detail .detail-body{display:block;padding:72px 0 110px;overflow:hidden}
.case-detail .detail-body aside{width:min(88vw,1180px);margin:0 auto 72px;padding:24px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;grid-template-columns:none;gap:7vw}
.case-detail .detail-body aside:empty{display:none}
.case-detail .detail-body aside p{margin:0}
.case-detail .detail-body span{font-size:10px;letter-spacing:.12em}
.case-detail .detail-story{width:min(760px,88vw);margin:0 auto;font-size:15px;line-height:2.05}
.case-detail .detail-story>h2{font:38px STSong,SimSun,serif;margin:0 0 30px}
.case-detail .detail-story>p{color:#5f615a;margin:0 0 24px}
.case-detail .detail-story>h2:not(:first-child){font-size:29px;margin:58px 0 20px}
.case-detail .detail-story .gallery{width:min(94vw,1560px)!important;margin:78px 0 40px!important;position:relative;left:50%;transform:translateX(-50%);display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.case-detail .detail-story .gallery:before,.case-detail .detail-story .gallery:after{display:none!important}
.case-detail .detail-story .gallery-item{float:none!important;width:auto!important;margin:0!important;overflow:hidden;background:#e8e2d7}
.case-detail .detail-story .gallery-item:nth-child(1),.case-detail .detail-story .gallery-item:nth-child(13),.case-detail .detail-story .gallery-item:nth-child(16){grid-column:1/-1}
.case-detail .detail-story .gallery-icon,.case-detail .detail-story .gallery a{display:block;height:100%}
.case-detail .detail-story .gallery img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;border:0!important}
.case-detail .detail-story .gallery-item:not(:nth-child(1)):not(:nth-child(13)):not(:nth-child(16)) img{aspect-ratio:3/4}
.case-detail .detail-story .gallery-item:nth-child(1) img,.case-detail .detail-story .gallery-item:nth-child(13) img,.case-detail .detail-story .gallery-item:nth-child(16) img{aspect-ratio:16/9}
/* Wangpin uses a complete portrait-format render set: keep every image uncropped in an efficient two-column editorial grid. */
.postid-45 .case-detail .detail-story .gallery-item:nth-child(n){grid-column:auto;aspect-ratio:3/4}
.postid-45 .case-detail .detail-story .gallery-item:nth-child(n) img{aspect-ratio:3/4;height:100%!important;object-fit:contain;background:#e8e2d7}
/* Xiaozici: alternate cinematic room views with portrait detail pairs. */
.postid-67 .case-detail .detail-story .gallery-item:nth-child(10),
.postid-67 .case-detail .detail-story .gallery-item:nth-child(18){grid-column:1/-1}
.postid-67 .case-detail .detail-story .gallery-item:nth-child(10) img,
.postid-67 .case-detail .detail-story .gallery-item:nth-child(18) img{aspect-ratio:16/9}
.postid-67 .case-detail .detail-story .gallery-item:nth-child(15) img,
.postid-67 .case-detail .detail-story .gallery-item:nth-child(17) img{aspect-ratio:1/1}
/* Qintang: wide public areas and bedrooms punctuate paired detail views. */
.postid-91 .case-detail .detail-story .gallery-item:nth-child(9),
.postid-91 .case-detail .detail-story .gallery-item:nth-child(18),
.postid-91 .case-detail .detail-story .gallery-item:nth-child(23){grid-column:1/-1}
.postid-91 .case-detail .detail-story .gallery-item:nth-child(9) img,
.postid-91 .case-detail .detail-story .gallery-item:nth-child(18) img,
.postid-91 .case-detail .detail-story .gallery-item:nth-child(23) img{aspect-ratio:16/9}
.postid-91 .case-detail .detail-story .gallery-item:nth-child(12) img,
.postid-91 .case-detail .detail-story .gallery-item:nth-child(21) img,
.postid-91 .case-detail .detail-story .gallery-item:nth-child(22) img{aspect-ratio:1/1}
/* Yunjing is predominantly landscape: use a compact two-column editorial rhythm. */
.postid-103 .case-detail .detail-story .gallery-item:nth-child(n){grid-column:auto}
.postid-103 .case-detail .detail-story .gallery-item:nth-child(n) img{aspect-ratio:4/3}
.postid-103 .case-detail .detail-story .gallery-item:nth-child(1){grid-column:1/-1}
.postid-103 .case-detail .detail-story .gallery-item:nth-child(1) img{aspect-ratio:16/9}
.postid-103 .case-detail .detail-story .gallery-item:nth-child(4) img,
.postid-103 .case-detail .detail-story .gallery-item:nth-child(10) img,
.postid-103 .case-detail .detail-story .gallery-item:nth-child(11) img{aspect-ratio:3/4}
.case-detail .case-back{display:inline-block;margin-top:34px;padding-bottom:5px;border-bottom:1px solid var(--ink)}
.presentation-return{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-top:55px;padding:22px 24px;background:#20251d;color:#fff;transition:background .25s,transform .25s}
.presentation-return:hover{background:#11150f;transform:translateY(-2px)}
.presentation-return span{color:#e7b29f!important;font-size:11px!important;letter-spacing:.15em}
.presentation-return strong{margin:0!important;color:#fff;font-size:15px}
.case-plan-section,.case-budget-proof{width:min(94vw,1500px);position:relative;left:50%;transform:translateX(-50%);margin:110px 0 20px;padding-top:60px;border-top:1px solid var(--line)}
.case-plan-section h2,.case-budget-proof h2{font:400 clamp(34px,4vw,58px)/1.35 STSong,SimSun,serif;margin:12px 0 20px}
.case-plan-kicker{margin:0!important;color:var(--rust)!important;font:10px/1.3 Arial,sans-serif!important;letter-spacing:.18em}
.case-plan-lead{max-width:650px;color:#6a6b64!important}
.case-plan-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:48px}
.case-plan-compare figure{margin:0}.plan-canvas{display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;border:1px solid #ded8ce;padding:12px;box-sizing:border-box}.plan-canvas img{display:block;width:100%!important;height:auto!important;object-fit:contain!important;aspect-ratio:auto!important}
.case-plan-compare figcaption{display:flex;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line)}.case-plan-compare figcaption>b{font:22px Georgia;color:var(--rust)}.case-plan-compare figcaption span{font-size:10px;color:#8a887f;letter-spacing:.08em}.case-plan-compare figcaption strong{display:block;font:20px STSong,SimSun,serif;color:var(--ink);letter-spacing:0}
.case-plan-points,.budget-proof-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-top:55px;background:var(--line)}.case-plan-points article,.budget-proof-grid article{padding:30px;background:var(--paper)}.case-plan-points b{font:21px Georgia;color:var(--rust)}.case-plan-points h3{font:24px STSong,SimSun,serif;margin:30px 0 12px}.case-plan-points p,.budget-proof-grid p{font-size:12px!important;line-height:1.9!important;color:#6d6e67!important;margin:0!important}
.case-budget-proof{display:grid;grid-template-columns:.58fr 1.42fr;gap:7vw;background:#292d25;color:#fff;border:0;padding:65px;box-sizing:border-box}.case-budget-proof h2{margin-bottom:22px}.budget-proof-intro>p:last-child{color:#ffffff8a!important;font-size:12px!important;line-height:1.9!important}.scope-browser{display:grid;grid-template-columns:1fr 1fr;gap:18px}.scope-browser>section{border:1px solid #ffffff24;background:#22261f}.scope-browser header{display:flex;align-items:center;gap:18px;padding:24px;border-bottom:1px solid #ffffff24}.scope-browser header>span{font:24px Georgia;color:#c78b76}.scope-browser header strong{display:block;font:20px STSong,SimSun,serif}.scope-browser header small{color:#ffffff66;font-size:10px}.scope-browser details{border-bottom:1px solid #ffffff18}.scope-browser details:last-child{border-bottom:0}.scope-browser summary{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;padding:17px 20px;cursor:pointer;list-style:none;font-size:13px}.scope-browser summary::-webkit-details-marker{display:none}.scope-browser summary small{color:#ffffff55;font-size:10px}.scope-browser summary i{font-style:normal;color:#c78b76;font-size:18px;transition:.25s}.scope-browser details[open] summary{background:#ffffff08}.scope-browser details[open] summary i{transform:rotate(45deg)}.scope-browser ul{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px;margin:0;padding:20px 22px 24px;list-style:none;background:#f1ece3;color:#3c3e37}.scope-browser li{position:relative;padding-left:12px;font-size:11px;line-height:1.6}.scope-browser li:before{content:"";position:absolute;left:0;top:.65em;width:3px;height:3px;border-radius:50%;background:var(--rust)}.budget-proof-note{grid-column:2;margin:18px 0 0!important;color:#ffffff66!important;font-size:10px!important}
.case-detail img,.case-photo,.hero-image,.philosophy-image{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.case-detail .gallery a{cursor:default;pointer-events:none}

/* High-contrast case facts and Xiaozici project scope for TV presentation. */
.case-detail .detail-body aside span{color:#5b5e56;font-size:12px}
.case-plan-compare figcaption span{color:#555850;font-size:11px}
.case-room-badge{color:#fff!important;background:rgba(16,18,15,.88)!important;font-size:11px!important}
.case-budget-proof{background:#171b16}
.case-budget-proof .case-plan-kicker{color:#f0b9a5!important;font-size:12px!important;font-weight:700!important}
.budget-proof-intro>p:last-child{color:#f1f1ec!important;font-size:14px!important;line-height:1.9!important}
.scope-browser>section{background:#111510;border-color:#ffffff55}
.scope-browser header{border-bottom-color:#ffffff55}
.scope-browser header small,.scope-browser summary small{color:#e8e8e2;font-size:12px}
.scope-browser summary{font-size:14px}
.scope-browser details{border-bottom-color:#ffffff38}
.scope-browser details[open] summary{background:#ffffff12}
.scope-browser li{font-size:13px;color:#30332e}
.budget-proof-note{color:#e5e5df!important;font-size:12px!important;line-height:1.8!important}
.scope-browser ul{gap:14px 24px;background:#f7f3eb}
.scope-browser li{padding-left:15px;font-size:14px;line-height:1.8;font-weight:500;color:#292c27;letter-spacing:.01em}
.scope-browser li:before{top:.78em;width:4px;height:4px}
.scope-browser summary>span{color:#fff!important;font-size:15px!important;font-weight:600;line-height:1.5;letter-spacing:.02em}
.scope-browser header strong{color:#fff;font-size:21px;font-weight:600}
.scope-browser summary i{color:#f0b9a5!important;font-weight:700}

/* Fast spatial browser: compact index + cinematic, user-controlled viewer. */
.case-detail .detail-story .case-gallery-toolbar{width:min(94vw,1560px);position:relative;left:50%;transform:translateX(-50%);margin:86px 0 -52px;display:grid;grid-template-columns:auto 1fr auto;align-items:end;gap:42px;padding:0 0 20px;border-bottom:1px solid var(--line)}
.case-gallery-toolbar p{margin:0 0 5px!important;color:var(--rust)!important;font:10px/1.2 Arial,sans-serif!important;letter-spacing:.17em}
.case-gallery-toolbar h2{margin:0!important;font:400 26px/1.3 STSong,SimSun,serif!important}
.case-gallery-toolbar nav{display:flex;justify-content:center;gap:5px;flex-wrap:wrap}
.case-gallery-toolbar button{appearance:none;border:1px solid transparent;background:transparent;color:#73736c;padding:8px 13px;font:12px/1 Arial,sans-serif;cursor:pointer;transition:.25s}
.case-gallery-toolbar button:hover,.case-gallery-toolbar button.is-active{border-color:#33352f;color:#22241f}
.case-gallery-count{font:11px/1 Arial,sans-serif;color:#8d8b83;white-space:nowrap}
.case-detail .detail-story .gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.case-detail .detail-story .gallery-item:nth-child(n){grid-column:auto!important;aspect-ratio:4/3!important;position:relative;cursor:zoom-in;outline:0}
.case-detail .detail-story .gallery-item:first-child{grid-column:1/-1!important;aspect-ratio:16/9!important}
.case-detail .detail-story .gallery-item:nth-child(n) img{width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;transition:transform .65s cubic-bezier(.2,.7,.2,1),filter .35s}
.case-detail .detail-story .gallery-item:hover img,.case-detail .detail-story .gallery-item:focus img{transform:scale(1.025);filter:brightness(.9)}
.case-detail .detail-story .gallery-item.is-filtered-out{display:none!important}
.case-room-badge{position:absolute;left:12px;bottom:12px;z-index:2;padding:6px 8px;background:rgba(22,23,20,.72);color:#fff;font:10px/1 Arial,sans-serif;letter-spacing:.08em;opacity:0;transform:translateY(4px);transition:.25s;pointer-events:none}
.gallery-item:hover .case-room-badge,.gallery-item:focus .case-room-badge{opacity:1;transform:none}
.case-detail .gallery a{cursor:zoom-in;pointer-events:auto}
body.case-viewer-open{overflow:hidden}
.case-lightbox{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(15,16,14,.97);opacity:0;visibility:hidden;transition:opacity .28s,visibility .28s}
.case-lightbox.is-open{opacity:1;visibility:visible}
.case-lightbox figure{width:min(84vw,1500px);height:86vh;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.case-lightbox img{display:block;max-width:100%;max-height:calc(86vh - 42px);width:auto;height:auto;object-fit:contain;user-select:none}
.case-lightbox figcaption{width:100%;display:flex;justify-content:space-between;padding-top:14px;color:#fff;font:11px/1.2 Arial,sans-serif;letter-spacing:.11em}
.case-lightbox figcaption b{font-weight:400;color:#ffffff88}
.case-lightbox button{position:absolute;appearance:none;border:0;background:transparent;color:#fff;cursor:pointer;font:300 24px/1 Arial,sans-serif;padding:18px;opacity:.72;transition:.2s}
.case-lightbox button:hover{opacity:1}
.case-lightbox-close{right:24px;top:18px;font-size:34px!important}
.case-lightbox-prev{left:18px;top:50%}.case-lightbox-next{right:18px;top:50%}
@media(max-width:800px){
  .case-detail .detail-hero{height:62vh;min-height:480px}
  .case-detail .detail-hero>div{left:6vw;bottom:42px}
  .case-detail .detail-hero h1{font-size:40px}
  .case-detail .detail-body{padding-top:48px}
  .case-detail .detail-body aside{margin-bottom:48px;gap:24px;flex-wrap:wrap}
  .case-detail .detail-story .gallery{width:94vw!important;gap:8px}
  .case-detail .detail-story .gallery-item:nth-child(n){grid-column:1/-1}
  .case-detail .detail-story .gallery-item img{aspect-ratio:auto!important;height:auto!important}
  .case-plan-section,.case-budget-proof{margin-top:70px;padding-top:38px}.case-plan-compare,.case-plan-points,.scope-browser{grid-template-columns:1fr}.case-budget-proof{display:block;padding:35px 24px}.scope-browser{margin-top:35px}.budget-proof-note{margin-top:18px!important}.plan-canvas{padding:6px}.scope-browser ul{grid-template-columns:1fr}
  .case-detail .detail-story .case-gallery-toolbar{margin:60px 0 -42px;grid-template-columns:1fr auto;gap:18px}.case-gallery-toolbar nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;overflow:auto;flex-wrap:nowrap;padding-bottom:3px}.case-gallery-toolbar button{white-space:nowrap}.case-detail .detail-story .gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}.case-detail .detail-story .gallery-item:nth-child(n){grid-column:auto!important;aspect-ratio:4/3!important}.case-detail .detail-story .gallery-item:first-child{grid-column:1/-1!important;aspect-ratio:16/9!important}.case-room-badge{opacity:1;transform:none}.case-lightbox figure{width:100vw;height:82vh}.case-lightbox img{max-height:calc(82vh - 48px)}.case-lightbox figcaption{width:88vw}.case-lightbox-prev,.case-lightbox-next{top:auto;bottom:14px}.case-lightbox-close{right:8px;top:5px}
}
