/* Layout and cropping for square frames in the shared artwork atlases. */
.case-shot { display:block; position:relative; aspect-ratio:1; overflow:hidden; background:var(--showcase-panel) }
.case-shot img { position:absolute; width:300%; height:calc(var(--atlas-rows,3) * 100%); top:calc(var(--atlas-y,0) * -100%); left:calc(var(--atlas-x,0) * -100%); max-width:none; max-height:none; display:block; user-select:none; pointer-events:none }
.case-shot > .case-shot-file { width:100%; height:100%; inset:0; object-fit:cover }
.case-featured { display:flex; align-items:center; gap:10px; margin:17px 0 0; width:fit-content }
.case-featured a { width:clamp(56px,10vw,86px); display:block; padding:2px; border:var(--showcase-outline); border-radius:var(--showcase-radius); background:var(--showcase-panel); box-shadow:var(--showcase-shadow); transition:transform .17s ease; color:inherit }
.case-featured .case-shot { border-radius:calc(var(--showcase-radius) * .67) }
.case-featured a:hover { transform:translateY(-4px) }
.case-featured a:focus-visible,.case-showcase :is(a,button,[tabindex]):focus-visible,.case-detail :is(a,button):focus-visible { outline:2px solid var(--showcase-focus); outline-offset:3px }
.case-showcase { color:var(--ink); background:var(--showcase-bg); padding:clamp(38px,6vw,76px) 0; scroll-margin-top:75px }
.case-showcase .wrap { min-width:0 }
.case-showcase-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:0 0 16px }
.case-showcase h2,.case-detail h2 { font-family:var(--showcase-display); line-height:1.12; margin:0; font-size:clamp(1.8rem,5vw,3.3rem) }
.case-showcase-head p { color:var(--muted); font-size:clamp(.76rem,1.4vw,.94rem); margin:7px 0 0 }
.case-controls { display:flex; flex:none; gap:6px }
.case-controls button,.case-detail button { min-width:36px; height:38px; padding:0 8px; display:grid; place-items:center; font:inherit; font-weight:700; border:var(--showcase-outline); border-radius:var(--showcase-radius); background:var(--showcase-panel); color:var(--ink); cursor:pointer }
.case-controls button:disabled { opacity:.4; cursor:default }
.case-scroll { display:grid; grid-auto-flow:column; grid-auto-columns:clamp(148px,22%,224px); grid-template-rows:minmax(0,auto); gap:12px; overflow-x:auto; padding:4px 3px 13px; margin:0; list-style:none; scroll-snap-type:x mandatory; scrollbar-width:thin; scrollbar-color:var(--showcase-focus) var(--showcase-panel); overscroll-behavior-inline:contain }
.case-scroll li { min-width:0; scroll-snap-align:start; scroll-margin-inline:3px }
.case-design-card { display:block; width:100%; height:100%; color:var(--ink); text-decoration:none; background:var(--showcase-panel); border:var(--showcase-outline); border-radius:var(--showcase-radius); box-shadow:var(--showcase-shadow); overflow:hidden }
.case-design-card .case-shot { width:100% }
.case-design-card:hover .case-design-name { text-decoration:underline; text-underline-offset:3px }
.case-design-name { display:block; padding:7px 9px; text-align:start; font-weight:700; line-height:1.25; font-size:.96rem }
.case-detail { max-width:min(400px,calc(100vw - 24px)); width:100%; max-height:calc(100dvh - 24px); overflow:auto; position:fixed; inset:0; margin:auto; padding:12px; color:var(--ink); background:var(--showcase-panel); border:var(--showcase-outline); border-radius:var(--showcase-radius); box-shadow:0 24px 100px #0005 }
.case-detail::backdrop { background:#15121999 }
.case-detail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px }
.case-detail h2 { font-size:clamp(1.25rem,5vw,1.7rem) }
.case-detail .case-shot { border-radius:var(--showcase-radius); max-height:57dvh; width:min(100%,57dvh); margin:0 auto }
.case-detail p { margin:8px 0; color:var(--muted); font-size:.85rem }
.case-detail a { display:inline-block; text-decoration:underline; text-underline-offset:3px; color:inherit; font-weight:700; padding:3px 0 }
.mcard-art:has(.case-shot) { padding:0; display:flex; justify-content:center; align-items:center; overflow:hidden }
.mcard-art .case-shot { height:100%; max-width:100%; }
.case-presets { margin:16px 0 0; border-top:var(--showcase-outline); padding:12px 0 0 }
.case-presets summary { width:fit-content; padding:4px; font-weight:700; cursor:pointer }
.case-showcase .case-presets .look-controls { margin-top:14px }
@media(max-width:680px) {
  .case-scroll { grid-auto-columns:clamp(130px,43vw,180px); gap:9px }
  .case-showcase-head { align-items:end; gap:7px }
  .case-controls { gap:4px }
  .case-controls button { min-width:32px; height:34px }
  .case-design-name { font-size:.84rem }
}
@media(prefers-reduced-motion:reduce) {
  .case-featured a { transition:none }
}
