/* Reserve the desktop frame in the first stylesheet; mobile keeps the native layout. */
.ep-pc-invoice{display:none}
@media(min-width:1024px){
 /* Never paint a review outside its desktop pane during either initialization order. */
 html.ep-pc-review-pending body#page_product_detail #product_review_area,
 body#page_product_detail #product_review_area{visibility:hidden}
 body#page_product_detail .ep-pc-scroll > #product_review_area{visibility:visible}
 html,body#page_product_detail{height:100%;overflow:hidden!important;overscroll-behavior:none}
 body#page_product_detail .ec-layoutRole{height:100dvh!important;min-height:0!important;overflow:hidden}
 body#page_product_detail .ec-layoutRole__header{position:relative;z-index:1050}

 body#page_product_detail .ec-productRole{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;height:auto!important}
 body#page_product_detail .ec-productRole>.ec-grid2{position:fixed!important;left:0;right:0;top:var(--ep-pc-header,89px);bottom:0;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%!important;max-width:none!important;margin:0!important;padding:0!important;height:auto!important;min-height:0;gap:0!important;transform:none!important}
 body#page_product_detail .ec-productRole>.ec-grid2>.ec-grid2__cell,body#page_product_detail .ec-productRole>.ec-grid2>.ec-grid2__cell2{width:auto!important;max-width:none!important;min-width:0!important;min-height:0!important;height:100%!important;max-height:none!important;margin:0!important;float:none!important;position:relative!important;overflow:visible!important;transform:none!important}
 body#page_product_detail .ec-productRole>.ec-grid2>.ec-grid2__cell{display:flex!important;flex-direction:column;padding:20px 32px 16px!important;background:#f7f9f8;border-right:1px solid #dae4df}
 body#page_product_detail .ec-sliderItemRole{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;height:100%;margin:0!important}
 body#page_product_detail .ep-ready-gallery-shell{flex:1;min-height:0;height:0!important;width:100%;margin:0!important}
 body#page_product_detail .item_visual,body#page_product_detail .item_visual .slick-list,body#page_product_detail .item_visual .slick-track,body#page_product_detail .item_visual .slick-slide,body#page_product_detail .item_visual .slick-slide>div,body#page_product_detail .item_visual .slide-item,body#page_product_detail .item_visual .js-zoom{height:100%!important;max-height:none!important;min-height:0!important;margin-top:0!important;margin-bottom:0!important}
 body#page_product_detail .item_visual .js-zoom{display:flex!important;align-items:center;justify-content:center;padding:12px 0 30px}
 body#page_product_detail .item_visual img{width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important;transform:none!important;mix-blend-mode:normal}
 body#page_product_detail .item_nav{flex:none;margin:12px 0 0!important;max-height:84px;overflow-y:auto}
 body#page_product_detail .item_nav .slideThumb{max-width:76px}
 body#page_product_detail .ec-productRole>.ec-grid2>.ec-grid2__cell2{display:flex!important;flex-direction:column;padding:0 0 var(--ep-pc-footer,90px)!important}
 body#page_product_detail .ep-pc-sections{height:auto!important;margin:0!important;display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex:none;min-height:52px;padding:8px 24px;border-bottom:1px solid #dce6e0;background:#fff}
 body#page_product_detail .ep-pc-sections button{border:0;border-radius:20px;padding:8px 12px;background:#edf3f0;color:#34574b;font-size:12px;cursor:pointer;line-height:1.5}
 body#page_product_detail .ep-pc-scroll{flex:1;min-height:0;min-width:0;overflow-x:hidden;overflow-y:scroll!important;scrollbar-gutter:stable;scrollbar-color:#57796e #e5ede8;scrollbar-width:auto;overscroll-behavior-y:contain;scroll-padding:18px 0 58px;padding:22px 28px 66px;background:#fff;position:relative}
 body#page_product_detail .ep-pc-scroll::-webkit-scrollbar{width:12px}
 body#page_product_detail .ep-pc-scroll::-webkit-scrollbar-track{background:#e5ede8}
 body#page_product_detail .ep-pc-scroll::-webkit-scrollbar-thumb{background:#57796e;border:3px solid #e5ede8;border-radius:8px}
 body#page_product_detail .ep-pc-scroll>.ec-productRole__profile{position:relative!important;overflow:visible!important;max-height:none!important;height:auto!important;width:100%!important;max-width:none!important;padding:0!important;margin:0!important;transform:none!important}
 body#page_product_detail .ep-pc-scroll .ec-productRole__category{position:static!important}
 body#page_product_detail .ep-pc-scroll .mitsumori-card-pc{display:none!important}
 body#page_product_detail .ep-pc-scroll .ec-layoutRole__mainBottom,body#page_product_detail .ep-pc-scroll .ec-layoutRole__footer{max-width:100%!important;width:100%!important;position:static!important;margin:28px 0 0!important}
 body#page_product_detail .ep-pc-scroll .ec-footerRole{padding:24px 12px;min-width:0;max-width:100%}
 body#page_product_detail .ep-pc-scroll .ec-footerRole .ec-footerRole__inner{width:100%!important;max-width:100%!important}
 body#page_product_detail .ep-pc-scroll-cue{position:absolute;z-index:10;bottom:var(--ep-pc-footer,90px);left:0;right:12px;width:calc(100% - 12px);height:40px;border:0;border-top:1px solid #dce6e0;background:linear-gradient(#f7faf8ed,#edf4f0);font-size:12px;font-weight:700;color:#345d51;cursor:pointer}
 body#page_product_detail .ep-pc-scroll-track{position:absolute;z-index:11;right:2px;top:60px;bottom:calc(var(--ep-pc-footer,90px) + 2px);width:8px;border-radius:6px;background:#e1eae5;pointer-events:none}
 body#page_product_detail .ep-pc-scroll-track span{display:block;width:8px;border-radius:6px;background:#56786b;will-change:transform}
 body#page_product_detail .ep-pc-scroll:focus-visible,body#page_product_detail .ep-pc-sections button:focus-visible,body#page_product_detail .ep-pc-scroll-cue:focus-visible{outline:3px solid #39866c;outline-offset:-3px}
 body#page_product_detail #sp-mitsumori-bar{display:block!important;position:fixed!important;top:auto!important;left:50%!important;right:0!important;bottom:0!important;width:50%!important;max-width:none!important;height:auto!important;z-index:1040!important;transform:none!important;margin:0!important;border:0!important;border-top:1px solid #cddad6!important;border-radius:0!important;background:#fff!important;box-shadow:0 -4px 18px #263f3b0c!important}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__content{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;padding:12px 22px!important;max-width:none!important;min-height:86px;position:static!important;transform:none!important}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__pricewrap{margin-right:8px!important;flex:0 1 480px!important;width:auto!important;min-width:0!important}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__label-row{display:flex;align-items:center;gap:16px}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__label{font-size:11px!important;color:#53666a}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__price{font-size:28px!important;line-height:1.3!important;color:#c33947!important;font-weight:700;white-space:normal!important;overflow-wrap:anywhere}
 body#page_product_detail #sp-mitsumori-bar .is-message .sp-bar__price{font-size:14px!important;color:#667875!important}
 body#page_product_detail #sp-mitsumori-bar .sp-bar__detail-btn{display:inline-flex!important;align-items:center;gap:5px;border:0;background:transparent;color:#365e54;font-size:12px;min-height:28px;padding:0 4px;text-decoration:underline;cursor:pointer}
 body#page_product_detail #sp-mitsumori-bar .ep-pc-invoice,body#page_product_detail #sp-mitsumori-bar .ep-ready-add-cart{display:inline-flex!important;align-items:center;justify-content:center;flex:none!important;min-height:46px;width:auto!important;margin:0!important;padding:10px 14px!important;border:1px solid #bdceca!important;border-radius:5px!important;background:#fff;color:#365c52;font-size:12px;font-weight:700;cursor:pointer}
 body#page_product_detail #sp-mitsumori-bar .ep-ready-add-cart{background:#dc304b!important;color:#fff!important;border-color:#dc304b!important}
 body#page_product_detail #sp-mitsumori-bar button:disabled{opacity:.55;cursor:default}
 body#page_product_detail .ec-blockTopBtn{display:none!important}
 body#page_product_detail #sp-mitsumori-detail .sp-detail-sheet__panel{max-width:680px;width:calc(100% - 32px);left:50%;right:auto;transform:translateX(-50%);max-height:calc(100dvh - 40px);bottom:20px;border-radius:10px}
}
@media(min-width:1024px) and (max-height:650px){body#page_product_detail .ec-productRole>.ec-grid2>.ec-grid2__cell{padding:12px 24px!important}body#page_product_detail .item_nav{max-height:56px}body#page_product_detail .item_nav img{max-height:48px;object-fit:contain}body#page_product_detail #sp-mitsumori-bar .sp-bar__content{min-height:74px;padding-top:8px!important;padding-bottom:8px!important}}

@media(min-width:1024px){body#page_product_detail #sp-mitsumori-bar .sp-bar__pricewrap{order:0!important}body#page_product_detail #sp-mitsumori-bar .ep-pc-invoice{order:1!important}body#page_product_detail #sp-mitsumori-bar .ep-ready-add-cart{order:2!important}}

@media(min-width:1024px){body#page_product_detail .ep-pc-sections button{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;font-size:11px}body#page_product_detail .ep-pc-step{display:inline-flex;flex:none;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:#365950;color:#fff;font-size:11px;font-weight:700}}

@media(min-width:1024px){
 html{--ep-pc-header:89px;--ep-pc-footer:90px}
 /* The native profile is the initial scroller until its existing node is moved. */
 body#page_product_detail:not(.ep-pc-split) .ec-grid2__cell2::before{content:"";display:block;flex:none;height:52px;box-sizing:border-box;border-bottom:1px solid #dce6e0;background:#fff}
 body#page_product_detail:not(.ep-pc-split) .ec-grid2__cell2 > .ec-productRole__profile{flex:1;min-height:0!important;max-height:none!important;height:auto!important;width:100%!important;max-width:none!important;margin:0!important;padding:22px 28px 66px!important;position:relative!important;overflow-x:hidden!important;overflow-y:scroll!important;scrollbar-gutter:stable;transform:none!important}
 body#page_product_detail .ec-productRole__profile > .ec-productRole__category{position:static!important}
 body#page_product_detail .ec-productRole__profile .mitsumori-card-pc{display:none!important}
 /* A single scrollable nav row has the same height before/after badge generation. */
 body#page_product_detail .ep-pc-sections{height:52px!important;min-height:52px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 body#page_product_detail .ep-pc-sections::-webkit-scrollbar{display:none}
 body#page_product_detail .ep-pc-sections button{flex:none;white-space:nowrap}
 /* Reserve the late maker plugin's row without duplicating its content or handlers. */
 body#page_product_detail .ep-ready-detail-head{grid-template-rows:36.5px auto}
 body#page_product_detail .ep-ready-detail-head #maker_area{grid-row:1}
 body#page_product_detail .ep-ready-detail-head .ec-productRole__title,body#page_product_detail .ep-ready-detail-head .ep-pdActions{grid-row:2}
 /* The unwrapped gallery and its later native wrapper consume the same free space. */
 body#page_product_detail .ec-sliderItemRole > .item_visual{flex:1;min-height:0!important;height:0!important}
 body#page_product_detail .item_visual:not(.slick-initialized) > .slide-item{width:100%}
 body#page_product_detail .item_visual:not(.slick-initialized) > .slide-item:not(:first-child){display:none}
 body#page_product_detail .item_nav{height:61px!important;min-height:61px;max-height:61px}
}
@media(min-width:1024px) and (max-height:650px){html{--ep-pc-header:77px;--ep-pc-footer:82px}body#page_product_detail .item_nav{height:56px!important;min-height:56px;max-height:56px}}

@media(min-width:1024px){body#page_product_detail .item_visual{border:0!important}}

/* Keep the amount and its label aligned to the available footer's left edge. */
body#page_product_detail #sp-mitsumori-bar .sp-bar__pricewrap{text-align:left!important}
body#page_product_detail #sp-mitsumori-bar .sp-bar__label-row{justify-content:flex-start!important;text-align:left!important}
body#page_product_detail #sp-mitsumori-bar .sp-bar__price{text-align:left!important}
@media(min-width:1024px){body#page_product_detail #sp-mitsumori-bar .sp-bar__pricewrap{flex:1 1 auto!important;margin-right:auto!important;min-width:0}}

/* Reserve document flow for the fixed desktop product grid until following blocks move. */
@media(min-width:1024px){body#page_product_detail .ec-layoutRole__main > .ec-productRole{min-height:calc(100dvh - var(--ep-pc-header,89px))!important}}

/* Keep gallery content contained, remove the cue, and compact choice spacing. */
@media(min-width:1024px){
 body#page_product_detail .item_visual .slick-slide > div{position:relative}
 body#page_product_detail .item_visual .slick-slide .slide-item{position:absolute!important;inset:0;height:auto!important;display:block!important}
 body#page_product_detail .item_visual .js-zoom{box-sizing:border-box;min-width:0!important}
 body#page_product_detail .item_visual img{aspect-ratio:auto!important;min-width:0!important;min-height:0!important}
 body#page_product_detail .ec-sliderItemRole .item_nav{height:76px!important;min-height:76px!important;max-height:76px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin}
 body#page_product_detail .ep-pc-scroll-cue{display:none!important}
}

/* Optional density proposal, separate from the gallery bug fix. */
body#page_product_detail .ec-productRole .ec-productRole__profile .ep-catalog-section-head{margin-top:18px;padding:12px 14px}
body#page_product_detail .ec-productRole__profile .ep-catalog-section-head h3{font-size:17px}
body#page_product_detail .ec-productRole .ec-productRole__profile .ep-catalog-section-field{padding:12px 14px!important}
body#page_product_detail .ec-productRole__profile .card-title{font-size:18px}
body#page_product_detail .ec-productRole__price{padding:10px 0;margin:10px 0 12px}
body#page_product_detail .ec-productRole__profile .ep-catalog-guide{padding:10px 12px;margin:16px 0 12px}
body#page_product_detail .ec-productRole__profile .ep-catalog-addon{margin:18px 0}
@media(max-width:767px){
 body#page_product_detail .ec-productRole .ec-productRole__profile .ep-catalog-section-head{padding:12px}
 body#page_product_detail .ec-productRole .ec-productRole__profile .ep-catalog-section-field{padding:12px!important}
}

/* The native pane scrollbar already provides position and drag controls. */
@media(min-width:1024px){
 body#page_product_detail .ep-pc-scroll-track{display:none!important}
}
