/* Only the adopted TOP works section. Three / two / one works per view. */
body.home.hidamari.kd-refined .kd-works-section .work-carousel {position:relative;padding-inline:56px;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-track {display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px 2px 12px;margin:0;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-track::-webkit-scrollbar {display:none;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-track > .work {flex:0 0 calc((100% - 48px)/3);min-width:0;scroll-snap-align:start;margin:0;opacity:1;transform:none;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button {position:absolute;top:clamp(48px,8vw,116px);width:44px;height:52px;padding:0;border:1px solid #080808;border-radius:0;background:#fff;color:#080808;font-size:24px;cursor:pointer;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-prev {left:0;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-next {right:0;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button:disabled {opacity:.25;cursor:default;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-status {text-align:right;font-size:13px;letter-spacing:.12em;color:#555;margin:18px 0 0;min-height:24px;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel :focus-visible {outline:2px solid #D52D18;outline-offset:2px;}
.kd-work-preview {border:0;padding:48px 16px 16px;max-width:94vw;max-height:92vh;background:#fff;}
.kd-work-preview::backdrop {background:rgb(8 8 8 / .75);}
.kd-work-preview img {display:block;max-width:86vw;max-height:76vh;object-fit:contain;margin:auto;}
.kd-work-preview button {position:absolute;right:4px;top:0;min-width:44px;min-height:44px;background:white;color:#080808;border:0;font-size:14px;cursor:pointer;}
@media(max-width:1024px){body.home.hidamari.kd-refined .kd-works-section .work-carousel-track > .work {flex-basis:calc((100% - 24px)/2);}}
@media(max-width:600px){
 body.home.hidamari.kd-refined .kd-works-section .work-carousel {padding-inline:0;padding-bottom:60px;}
 body.home.hidamari.kd-refined .kd-works-section .work-carousel-track > .work {flex-basis:100%;}
 body.home.hidamari.kd-refined .kd-works-section .work-carousel button {top:auto;bottom:0;height:44px;}
 body.home.hidamari.kd-refined .kd-works-section .work-carousel-status {position:absolute;bottom:8px;left:60px;right:60px;text-align:center;margin:0;}
}
/* Center-selected overlapping gallery. */
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track {position:relative;display:block;overflow:hidden;scroll-snap-type:none;padding:4px 0 12px;touch-action:pan-y;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work {position:absolute;top:4px;left:50%;width:58%;margin:0;transform:translateX(-50%);z-index:3;transition:transform 450ms cubic-bezier(.22,1,.36,1),opacity 350ms ease-out;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="previous"] {transform:translateX(-126%) scale(.86);transform-origin:center 35%;z-index:1;pointer-events:none;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="next"] {transform:translateX(26%) scale(.86);transform-origin:center 35%;z-index:1;pointer-events:none;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="hidden"] {visibility:hidden;opacity:0;pointer-events:none;z-index:0;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work:not([data-position="current"]) .work-info {visibility:hidden;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="current"] .work-card {background:#fff;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button {top:clamp(70px,12vw,185px);}
@media(max-width:600px){
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work {width:80%;}
 body.home.hidamari.kd-refined .kd-works-section .work-carousel button {top:auto;bottom:0;}
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track .work-name {font-size:18px;}
}
@media(prefers-reduced-motion:reduce){body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work {transition:none;}}
/* Keep the selected work true to its original colors; dim only the side previews. */
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work figure {filter:brightness(1);transition:filter 450ms ease-out;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="previous"] figure,
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="next"] figure {filter:brightness(.76);}
@media(prefers-reduced-motion:reduce){body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work figure {transition:none;}}
/* Five selectable dots, centered below the works. Keep status for screen readers only. */
body.home.hidamari.kd-refined .kd-works-section .work-carousel .work-carousel-status {position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-dots {display:flex;justify-content:center;margin:12px auto 0;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button.work-carousel-dot {position:static;display:grid;place-items:center;width:44px;height:44px;min-width:0;padding:0;border:0;background:transparent;border-radius:50%;font-size:0;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-dot::before {content:"";width:7px;height:7px;border-radius:50%;background:#aaa;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel-dot[aria-current="true"]::before {background:#D52D18;}
@media(max-width:600px){body.home.hidamari.kd-refined .kd-works-section .work-carousel-dots {position:absolute;bottom:0;left:48px;right:48px;margin:0;}}
/* Enlarge the thumbnail frame, not the image within it. */
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-card > figure img,
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-card > figure:hover img {transform:none;transition:none;}
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-card > figure {transform-origin:center top;}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-card > figure {transition:filter 450ms ease-out,transform 400ms ease-out;}
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work[data-position="current"] .work-card > figure:hover {transform:scale(1.025);}
}
/* Explicit specificity: the depth filter rule must not replace the scale transition. */
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work .work-card > figure {
  transform:translateZ(0) scale(1);transition:filter 450ms ease-out,transform 500ms cubic-bezier(.22,.61,.36,1);
 }
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="current"] .work-card > figure {will-change:transform;}
 body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="current"] .work-card > figure:hover {transform:translateZ(0) scale(1.025);}
}
/* Side previews select a work; their destination links stay inert until centered. */
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="previous"],
body.home.hidamari.kd-refined .kd-works-section .is-ready .work-carousel-track > .work[data-position="next"] {pointer-events:auto;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button.work-side-select {position:absolute;inset:0 0 auto;width:100%;height:auto;aspect-ratio:3/2;min-width:0;padding:0;border:0;border-radius:0;background:transparent;z-index:5;cursor:pointer;}
body.home.hidamari.kd-refined .kd-works-section .work-carousel button.work-side-select[hidden] {display:none;}

body.home.hidamari.kd-refined .kd-works-section .work-carousel[data-input="pointer"] .work-card:focus{outline:none!important;}
