:root{--work-cover-ratio:4 / 3}
.work-shelf-layout{max-width:1712px}
.work-shelf-content{min-width:0}
.work-shelf-rail{display:none}
@media(min-width:1240px){
  .work-shelf-layout{display:grid;grid-template-columns:244px minmax(0,1fr);gap:22px}
  .work-shelf-rail{display:block;contain:size}
}
.work-card-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.work-card-grid[hidden]{display:none}
.work-card-grid article{min-width:0;padding:clamp(8px,1.1vw,15px);border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);overflow-wrap:anywhere}
@media(max-width:980px){.work-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.work-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.work-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.work-card-grid{grid-template-columns:minmax(0,1fr)}}
.work-card-grid--full-covers .card-image{width:min(240px,100%);margin-inline:auto}
.work-shelf-collection article{display:flex;flex-direction:column;container-type:inline-size}
.work-shelf-collection h2{margin:0 0 6px;font-size:1.02rem}
.work-shelf-collection .work-preview-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.work-shelf-collection .candidate-actions{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;margin-top:auto}
.work-shelf-collection .work-card-links{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:stretch}
.work-shelf-collection .work-action-anchor{justify-content:center;min-width:0;line-height:1.2;text-align:center;overflow-wrap:anywhere}
.work-shelf-collection .candidate-actions :is(button,.button){min-height:40px}
.actions.candidate-actions{gap:5px}
.candidate-actions :is(button,.button){min-height:33px;padding:4px 8px;font-size:.84rem}
.work-card-links{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%}
.work-card-links .favorite-button{flex:none}
.work-card-links .button{min-width:0;overflow-wrap:anywhere}
.candidate-actions .work-action-anchor{border-color:#25476d;background:#25476d;color:#fff}
.candidate-actions .work-action-anchor:hover{border-color:#193754;background:#193754;color:#fff}
.candidate-actions .work-action-remove{border-color:#c9c3d4;background:#fff;color:#514862}
.candidate-actions .work-action-remove:not(:disabled):hover{border-color:#a59ab8;background:#f2edf8;color:#514862}
:is(.work-card-links,.discovery-card-actions) .favorite-button{border-color:#e5cc94;background:#fffaf0;color:#825811}
:is(.work-card-links,.discovery-card-actions) .favorite-button:hover{border-color:#caa252;background:#fff1cd}
:is(.work-card-links,.discovery-card-actions) .favorite-button[aria-pressed="true"]{border-color:#d4ab57;background:#ffe6a6;color:#734b08}
.work-card-links .work-action-dlsite{position:relative;justify-content:center;border-color:#c4d4e6;background:#fff;color:#234765;text-align:center}
.work-card-links .work-action-dlsite:hover{border-color:#87aac6;background:#edf5fc;color:#163e61}
@media(prefers-reduced-motion:no-preference){
  .work-action-dlsite[data-sparkle]::after{
    content:"";position:absolute;pointer-events:none;
    inset:-6px -6px auto auto;width:16px;height:16px;
    background:#e1a238;
    clip-path:polygon(50% 0,66% 34%,100% 50%,66% 66%,50% 100%,34% 66%,0 50%,34% 34%);
    animation:dlsite-corner-sparkle 740ms ease-out 350ms both;
  }
  .work-preview .work-action-dlsite[data-sparkle]::after{animation-delay:0ms}
  @keyframes dlsite-corner-sparkle{
    0%,100%{opacity:0;transform:scale(.55)}
    12%{opacity:1;transform:scale(1)}
    55%{opacity:.8;transform:scale(.92)}
  }
}
.work-action-dlsite-label{min-width:0;font-weight:600;line-height:1.3}
.work-action-dlsite-label strong{font-weight:800}
@media(max-width:560px){
  .actions.candidate-actions{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:6px}
  .candidate-actions :is(button,.button){min-height:44px;padding-inline:6px}
  .candidate-actions .work-action-anchor{justify-content:center;min-width:0;text-align:center;overflow-wrap:anywhere}
  .candidate-actions .work-card-links{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:stretch;gap:6px}
  .work-preview-footer .candidate-actions{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
  .work-shelf-collection .candidate-actions :is(button,.button){min-height:44px}
}
@media(min-width:561px){
  @container (min-width:220px){
    .work-shelf-collection .candidate-actions{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
    .work-shelf-collection .work-card-links{grid-template-columns:30px minmax(0,1fr)}
    .work-shelf-collection .candidate-actions :is(button,.button){padding-inline:5px}
  }
}
@media(min-width:761px){
  .work-card-grid--full-covers{grid-template-columns:repeat(auto-fill,minmax(262px,1fr));max-width:1358px}
  .work-card-grid--full-covers article{padding:10px}
}
.card-image{display:block;width:100%;min-height:0;padding:0;margin-bottom:10px;border:0;background:var(--surface-subtle)}
.card-image:hover{background:var(--surface-hover)}
.work-image{position:relative;display:grid;place-items:center;aspect-ratio:var(--work-cover-ratio);background:var(--surface-subtle);color:var(--muted);border-radius:var(--radius-small);overflow:hidden}
.work-image img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.work-image img[hidden]{display:none}
.work-image small{padding:8px;text-align:center}
.work-preview-title{min-height:0;padding:0;border:0;border-radius:0;background:transparent;font:inherit;color:inherit;text-align:left;overflow-wrap:anywhere}
.work-preview-title:hover{background:transparent;text-decoration:underline}
.work-preview{width:min(880px,calc(100% - 24px));height:min(760px,calc(100dvh - 24px),calc(100vw + 140px));max-height:calc(100dvh - 24px)}
.work-preview[open]{display:flex;flex-direction:column;gap:10px;overflow:hidden}
@media(prefers-reduced-motion:no-preference){
  .work-preview[open],.work-preview[open]::backdrop{animation:work-preview-appear 145ms ease-out both}
  .work-preview[data-closing],.work-preview[data-closing]::backdrop{animation:work-preview-disappear 150ms ease-in both}
  @keyframes work-preview-appear{from{opacity:0}to{opacity:1}}
  @keyframes work-preview-disappear{from{opacity:var(--preview-close-opacity,1)}to{opacity:0}}
}
.work-preview-heading{display:flex;flex:none;align-items:start;justify-content:space-between;gap:12px}
.work-preview-heading h2{display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);block-size:3.9em;min-width:0;overflow:hidden;margin:0;line-height:1.3}
.work-preview-heading h2>span{grid-area:1/1;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.work-preview-heading button{white-space:nowrap}
.work-preview-credits{
  position:relative;flex:none;block-size:36px;overflow:hidden;
  color:var(--muted);font-size:.85rem;
}
.work-preview-credit-layers{display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);height:100%}
.work-preview-credit-track{
  grid-area:1/1;display:flex;align-items:center;gap:12px;min-width:0;overflow-x:auto;
  overscroll-behavior-inline:contain;scrollbar-width:none;padding:4px 3px;
}
.work-preview-credit-track::-webkit-scrollbar{display:none}
@media(any-pointer:fine){
  .work-preview-credit-track[data-scrollable]{cursor:grab;user-select:none}
  .work-preview-credit-track[data-dragging],.work-preview-credit-track[data-dragging] a{cursor:grabbing}
}
.work-preview-credit-entry{display:flex;flex:none;align-items:baseline;gap:6px;white-space:nowrap}
.work-preview-credit-entry + .work-preview-credit-entry{border-inline-start:1px solid var(--line-strong);padding-inline-start:12px}
.work-preview-credits a{font-weight:650;text-decoration:underline;text-underline-offset:.15em}
.work-preview-credits a:focus-visible{outline-offset:1px}
.work-preview-credits .work-preview-credit-arrow{
  position:absolute;inset-block:0;display:grid;place-items:center;width:32px;min-height:0;
  padding:0;border:0;border-radius:0;color:#7a8ca0;
  background:linear-gradient(var(--credit-arrow-fade),var(--surface) 55%,transparent);
}
.work-preview-credit-arrow:hover,.work-preview-credit-arrow:focus-visible{color:#285d83}
.work-preview-credit-arrow:focus-visible{outline-offset:-2px}
.work-preview-credit-arrow::before{
  content:"";width:7px;height:7px;border:solid currentColor;border-width:0 1.5px 1.5px 0;
  transform:rotate(var(--credit-arrow-angle));
}
.work-preview-credit-arrow[data-direction="left"]{
  inset-inline-start:0;--credit-arrow-fade:to right;--credit-arrow-angle:135deg;
}
.work-preview-credit-arrow[data-direction="right"]{
  inset-inline-end:0;--credit-arrow-fade:to left;--credit-arrow-angle:-45deg;
}
.work-preview-media{position:relative;flex:1;min-height:0}
.work-preview-stage{display:grid;grid-template: minmax(0,1fr)/minmax(0,1fr);place-items:center;height:100%;overflow:hidden;background:var(--surface-subtle);border-radius:var(--radius-small)}
.work-preview-stage>*{grid-area:1/1}
.work-preview-stage img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;background:var(--surface-subtle)}
.work-preview-stage p{display:grid;place-items:center;width:100%;height:100%;margin:0;background:var(--surface-subtle)}
.work-preview-arrow{position:absolute;top:50%;display:grid;place-items:center;width:44px;height:44px;min-height:0;transform:translateY(-50%);padding:0;border:1px solid #fff6;border-radius:50%;color:#fff;background:#17263cd9}
.work-preview-arrow:hover{background:#17263c}
.work-preview-arrow::before{content:"";width:11px;height:11px;border:solid currentColor;border-width:0 2px 2px 0}
.work-preview-previous{left:8px}
.work-preview-previous::before{transform:translateX(2px) rotate(135deg)}
.work-preview-next{right:8px}
.work-preview-next::before{transform:translateX(-2px) rotate(-45deg)}
.work-preview-arrow[aria-disabled="true"]{opacity:.38;cursor:default}
.work-preview-footer{flex:none;padding-top:10px;border-top:1px solid var(--line)}
.work-samples{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:12px}
.work-samples a{display:block}
.work-samples img{display:block;width:100%;height:auto;border-radius:6px}
