/* Scoped lightweight 3D navigation. Real photo cards remain in the existing grid. */
.library-overview-shelf.shelf-host{min-width:0;display:block;padding:14px 24px 14px}
.shelf-heading,.shelf-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.library-overview-shelf>.shelf-heading{justify-content:flex-end;min-height:34px}
.shelf-heading h1#libraryOverviewTitle{font-size:23px}
.shelf-heading .eyebrow{font-size:9px}
.shelf-reset{flex-shrink:0;font-size:11px;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);padding:8px 10px}
.shelf-row{display:flex;gap:34px;overflow-x:auto;align-items:flex-end;min-height:188px;padding:18px 20px 12px;perspective:1100px;border-bottom:9px solid var(--surface-3);box-shadow:0 8px 8px -6px #0004,inset 0 -1px #fff8;scrollbar-width:thin}
.shelf-slot{flex:0 0 122px;text-align:center}
button.shelf-year{position:relative;display:block;width:104px;height:136px;padding:0;margin:0 auto 12px;background:none;border:0;transform:rotateY(-31deg) rotateX(11deg) rotateZ(-4deg);transform-style:preserve-3d;transition:transform .35s}
/* filter(drop-shadow)는 preserve-3d 를 평면으로 눌러 월별 낱장의 깊이가 사라졌다(두께감 없음). 그림자는 뒤표지가 진다. */
button.shelf-year:hover,button.shelf-year:focus-visible{transform:translateY(-8px) rotateY(-24deg) rotateX(8deg) rotateZ(-3deg)}
.shelf-year-face,.shelf-year-layer{position:absolute;border:1px solid #ffffffc9;transform-style:preserve-3d}
.shelf-year-face{inset:-2px 1px -1px -5px;display:flex;align-items:flex-start;justify-content:center;padding-top:22px;border-radius:20px 15px 15px 20px;background:linear-gradient(112deg,#f9cbd638 0%,#ffffff5c 18%,#f5f7f842 48%,#d9f2ff40 78%,#f3d2e538 100%);backdrop-filter:blur(1px) saturate(1.05);box-shadow:inset 5px 3px 8px #ffffffa0,inset -3px -3px 7px #7aa5bd55,0 0 0 1px #d8edf58c,5px 7px 10px #24394b2b;transform:translateZ(3px);overflow:hidden}
.shelf-year-face:before{content:'';position:absolute;z-index:-1;left:-5px;top:5px;bottom:5px;width:18px;border-radius:18px 5px 5px 18px;background:linear-gradient(90deg,#f5bccc80,#fff8 42%,#a9d8ed6b 78%,transparent);box-shadow:inset 3px 0 4px #fff9,2px 0 3px #59758728}
.shelf-year-face:after{content:'';position:absolute;inset:2px;border-radius:18px 13px 13px 18px;background:linear-gradient(142deg,#fff7 0 6%,transparent 20% 72%,#bddff033 86%,#f3cadb40);box-shadow:inset 0 0 8px #fff5;pointer-events:none}
/* 두께: 월별 낱장이 앞표지와 뒤표지 사이에 끼워진 앨범. 뒤표지는 앨범 두께(--book-depth)만큼 뒤에,
   책등은 왼쪽 가장자리에서 90도 꺾여 두 표지를 잇는다. */
.shelf-year-back{position:absolute;inset:-2px 1px -1px -5px;border-radius:20px 15px 15px 20px;border:1px solid #ffffffb0;background:linear-gradient(112deg,#f4d3df70,#f3f6f880 42%,#cfe7f370);box-shadow:inset 3px 3px 7px #ffffff90,inset -3px -3px 8px #6d8fa455,6px 10px 12px #24394b38;transform:translateZ(calc(-1 * var(--book-depth,20px) - 4px))}
.shelf-year-spine{position:absolute;left:-5px;top:1px;bottom:2px;width:calc(var(--book-depth,20px) + 7px);border-radius:10px;border:1px solid #ffffffb8;background:linear-gradient(90deg,#f2c6d680,#ffffffb0 45%,#b9dcec80);transform-origin:left center;transform:translateZ(3px) rotateY(90deg)}
.shelf-crystal-year{position:relative;z-index:1;font:bold 29px Georgia,serif;letter-spacing:-1px;color:#efe9ef9e;-webkit-text-stroke:.75px #756b7d8f;text-shadow:0 1px 1px #fff,-1px -1px 1px #4f4c6287,1px 2px 3px #e9c9df;filter:drop-shadow(0 1px 1px #fff)}
/* 투명한 앨범 안에 월별 파일이 살짝 비치게: 표지보다 조금 작은 낱장으로 두고(흰 테두리가 겹겹이 보임),
   아주 옅은 월 색은 채도를 올려 유리 너머에서도 파스텔로 읽히게 한다. 불투명도를 낮춰 12장이 겹쳐도 막히지 않는다. */
.shelf-year-layer{inset:6px 5px 6px 7px;border-radius:13px 10px 10px 13px;background:color-mix(in srgb,var(--month-tone) var(--layer-fill,14%),transparent);filter:saturate(6) brightness(.86);outline:1.5px solid #ffffffa8;outline-offset:-1.5px;box-shadow:none;transform:translate3d(calc(2px + var(--layer-shift,0px)),calc(2px + var(--layer-shift,0px)),var(--layer-depth))}
.shelf-year-layer.is-recent-month{opacity:.96;transform:translate3d(16px,-4px,var(--layer-depth));box-shadow:inset 2px 2px 5px #fff,5px 6px 9px #263b4c30}
.shelf-year-layer.is-recent-month .shelf-layer-tab{outline:1px solid #8a8195;box-shadow:2px 1px 3px #0002}
.shelf-layer-tab{position:absolute;right:-10px;top:var(--tab-top);width:11px;height:15px;border-radius:0 6px 6px 0;background:linear-gradient(90deg,var(--month-tone),#ffffffa8);border:1px solid #ffffffc7;border-left:0;box-shadow:2px 1px 3px #40556624}
.shelf-year-caption{font-size:11px;color:var(--ink-dim)}
.shelf-help{font-size:12px;color:var(--ink-dim);margin:12px 0 0;line-height:1.6}
.shelf-empty{font-size:13px;color:var(--ink-dim);align-self:center}
.shelf-inline{grid-column:1/-1;min-width:0;padding:24px;color:var(--ink);border-top:1px solid var(--line-strong);scroll-margin-top:24px}
.shelf-inline[hidden]{display:none}
.shelf-inline:not([hidden]){animation:shelf-inline-reveal .3s ease-out}
.shelf-inline .shelf-3d-stage{width:100%;margin-inline:auto}
.shelf-inline .shelf-months{max-width:1000px;margin-inline:auto}
.shelf-year[aria-expanded=true]{transform:translateY(-8px) rotateY(-24deg) rotateX(8deg) rotateZ(-3deg)}

[data-theme="dark"] .shelf-year-face{background:linear-gradient(112deg,#76566540,#d9e0e552 22%,#83919c45 56%,#8cc5dc40 82%,#9c718a3a);box-shadow:inset 5px 3px 8px #ffffffa8,inset -3px -3px 7px #243a4a8c,0 0 0 1px #c8e4ef66,5px 7px 10px #0006}
[data-theme="dark"] .shelf-year-back{background:linear-gradient(112deg,#76566555,#b9c3ca5c 42%,#8cc5dc4d);box-shadow:inset 3px 3px 7px #ffffff55,inset -3px -3px 8px #0008,6px 10px 14px #0008}
[data-theme="dark"] .shelf-year-spine{background:linear-gradient(90deg,#9c718a66,#d9e0e580 45%,#8cc5dc66);border-color:#c8e4ef80}
[data-theme="dark"] .shelf-crystal-year{color:#fff9;-webkit-text-stroke:.75px #393343;text-shadow:0 1px #fff8,-1px -1px 1px #111,1px 2px 3px #b887a7}
@keyframes shelf-inline-reveal{from{opacity:0;translate:0 -8px}to{opacity:1;translate:0 0}}
@media(max-width:700px){.shelf-inline{padding:18px 16px}.shelf-dialog-head{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.shelf-inline:not([hidden]){animation:none}}
.shelf-dialog-head h2{font:700 26px Georgia,serif;margin:4px 0}
.shelf-dialog-head button{padding:10px 14px;background:var(--surface-2);border:1px solid var(--line-strong);color:var(--ink)}
.shelf-open-book{position:relative;perspective:1100px;margin-top:24px}
.shelf-opening-cover{pointer-events:none;position:absolute;inset:0;z-index:3;background:linear-gradient(120deg,#f8f9facf,#dfe3e9d9);border:1px solid #fff;border-radius:16px;transform-origin:left center;font:700 60px Georgia;padding:45px;color:#ada3b5;animation:shelf-unfold .7s both}
.shelf-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px 28px;padding:10px 20px 14px}
button.shelf-month{position:relative;isolation:isolate;min-width:0;height:205px;background:none;border:0;padding:0;margin:0 9px 24px 0;transform:perspective(600px) rotateY(-7deg);transition:transform .25s;animation:shelf-month-in .6s both;animation-delay:calc(.14s + var(--order)*.025s)}
button.shelf-month:hover,button.shelf-month:focus-visible{transform:translateY(-7px);outline:2px solid var(--ink-dim);outline-offset:5px}
.shelf-month-face{position:absolute;inset:0;border-radius:12px;border:1px solid #fff9;background:linear-gradient(130deg,#ffffff9c,transparent),var(--month-tone);box-shadow:inset 2px 2px 5px #fff9,inset -2px -1px 6px #75818a33,4px 5px 9px #0002;overflow:hidden}
.shelf-blurred-cover{position:absolute;inset:24% 10% 14%;width:80%;height:62%;object-fit:cover;filter:blur(5px);opacity:.62;pointer-events:none}
.shelf-month-face:after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,#fff5,transparent 40%,#fff3);pointer-events:none}
.shelf-month-tab{position:absolute;right:-15px;top:var(--tab-top);height:44px;width:21px;display:grid;place-items:center;background:var(--month-tone);border:1px solid #ffffffa0;border-left:0;border-radius:0 7px 7px 0;box-shadow:2px 1px 4px #0002}
.shelf-month-tab>span{display:block;white-space:nowrap;transform:rotate(270deg);font-size:8px;color:#60596b;text-shadow:0 1px #fff,1px 0 #e9cce9}
.shelf-month-caption{position:absolute;top:calc(100% + 8px);left:0;right:-10px;text-align:center;font-size:12px;color:var(--ink)}
.shelf-month[aria-pressed=true] .shelf-month-face{outline:2px solid var(--info,#487abe)}
.shelf-filter-note{margin:0;padding:12px 20px;border-bottom:1px solid var(--line);font-size:13px;color:var(--ink-dim)}
.shelf-filter-note[hidden]{display:none}
.shelf-filter-note button{margin-left:12px;padding:5px 10px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink)}
@keyframes shelf-expand{from{opacity:0;transform:scale(.78) translateY(30px)}to{opacity:1;transform:none}}
@keyframes shelf-unfold{from{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(-105deg)}}
@keyframes shelf-month-in{from{opacity:0;translate:-18px 8px}to{opacity:1;translate:0 0}}
@media(max-width:700px){.shelf-months{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.shelf-dialog{padding:18px}.shelf-months button.shelf-month{height:175px}.library-overview-shelf.shelf-host{padding:12px 16px 14px}.shelf-heading{flex-wrap:wrap}.library-overview-shelf>.shelf-heading{min-height:32px}}
@media(max-width:460px){.shelf-months{grid-template-columns:repeat(2,minmax(0,1fr));padding:5px 8px}.shelf-dialog-head h2{font-size:22px}.shelf-dialog{padding:16px}.shelf-row{gap:20px}.shelf-heading h1#libraryOverviewTitle{font-size:21px}}
@media(prefers-reduced-motion:reduce){.shelf-dialog[open],.shelf-opening-cover,button.shelf-month{animation:none!important}.shelf-opening-cover{display:none}.shelf-year,.shelf-month{transition:none!important}}
.shelf-3d-stage{height:460px;min-width:0;border-radius:14px;overflow:hidden;background:linear-gradient(140deg,#f6f5f3,#dcdfe4);margin-top:12px}
.shelf-3d-stage[hidden]{display:none}
.shelf-3d-status:empty{display:none}
.shelf-3d-stage canvas{display:block;width:100%;height:100%;touch-action:pan-y}
.shelf-3d-status{font-size:12px;line-height:1.5;color:var(--ink-dim);margin:10px 0 0}
.has-shelf-3d .shelf-opening-cover{display:none}
.has-shelf-3d .shelf-months{display:flex;flex-wrap:wrap;gap:8px;padding:0}
.has-shelf-3d .shelf-open-book{margin-top:12px}
.has-shelf-3d button.shelf-month{height:auto;margin:0;padding:9px 12px;transform:none;animation:none;border:1px solid var(--line-strong);background:var(--surface-2)}
.has-shelf-3d .shelf-month-face,.has-shelf-3d .shelf-month-tab{display:none}
.has-shelf-3d .shelf-month-caption{position:static;display:block;font-size:12px}
@media(max-width:460px){.shelf-3d-stage{height:360px}}

/* Stainless rim and clear glass date files; finished album cards are unchanged. */
.library-section .file-grid .file-card{border:3px solid transparent;border-radius:20px!important;background:linear-gradient(135deg,#ffffffb8,#e7edf077 46%,#ffffffa3) padding-box,linear-gradient(120deg,#f9fcff,#a0abb5 14%,#f7fafc 27%,#697681 46%,#e3e9ed 62%,#8e9aa4 82%,#fafcff) border-box;box-shadow:inset 1px 1px 3px #fff,inset -2px -2px 5px #75879438,3px 4px 0 #9ba7b055,0 10px 22px #182b3d24;backdrop-filter:blur(8px);color:var(--ink)}
.library-section .file-grid .file-card .item-cover{border-radius:13px;border:1px solid #d7e0e7;box-shadow:0 1px 2px #fff9;filter:none}
.library-section .file-grid .file-card.selected,.library-section .file-grid .file-card:focus-visible{outline:3px solid var(--info,#487abe);outline-offset:4px}
.library-section .file-grid .file-card .item-actions button{background:var(--surface);color:var(--ink)}
[data-theme="dark"] .library-section .file-grid .file-card{background:linear-gradient(135deg,#343c46e8,#1c2630cc 46%,#414b55df) padding-box,linear-gradient(120deg,#dce5eb,#65727f 25%,#e4edf3 43%,#56636f 64%,#c5d1da) border-box;box-shadow:inset 1px 1px 3px #ffffff45,3px 4px 0 #75828b66,0 10px 22px #0005}

/* ── 책장 그 자리에서 열기 (blender/isle_glass_library_v4.blend 타임라인) ──
   년도 앨범을 누르면 책장 아래에 새 칸을 만들지 않고, 책장 줄 위에 3D 장면을 겹쳐 그 책이
   빠져나와 열리게 한다. 제목 줄·테두리 없이 책장 카드가 아래로만 늘어난다.
   나머지 년도 책은 Blender 장면처럼 뒤에 흐리게 남는다. */
.library-overview-shelf.shelf-host{position:relative}
.shelf-host>.shelf-inline{position:relative;z-index:2;grid-column:auto;margin-top:calc(-1 * var(--shelf-row-h,178px));padding:0;border-top:0}
.shelf-host>.shelf-inline:not([hidden]){animation:none}
.shelf-inplace-title{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shelf-fold{position:absolute;top:10px;left:10px;z-index:4;padding:7px 12px;font-size:12px;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);box-shadow:0 4px 12px #0002}
.shelf-host>.shelf-inline .shelf-3d-stage{margin-top:0;border-radius:0;background:transparent}
.shelf-host>.shelf-inline .shelf-3d-status{position:absolute;left:12px;bottom:10px;z-index:3;margin:0}
/* 3D 가 뜨면 월 버튼 목록은 화면에서 감춘다. 키보드로 들어오면 다시 보이고, 3D 를 못 쓰면 대신 쓴다. */
.shelf-host>.shelf-inline .shelf-months{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shelf-host>.shelf-inline .shelf-months:focus-within,.shelf-host>.shelf-inline.is-3d-fallback .shelf-months{position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal}
.shelf-host>.shelf-inline:not(.is-3d-fallback) .shelf-opening-cover{display:none}
.shelf-host>.shelf-inline.is-3d-fallback .shelf-open-book{margin-top:0;padding-top:46px;background:var(--surface-2);border-radius:14px}
.shelf-host.is-shelf-open .shelf-help{display:none}
.shelf-host.is-shelf-open .shelf-year:not(.is-lifted){opacity:.4;filter:blur(1px);transition:opacity .3s,filter .3s}
.shelf-year.is-lifted{visibility:hidden}
@media(prefers-reduced-motion:reduce){.shelf-host.is-shelf-open .shelf-year{transition:none}}
/* 접기 단추는 열려 있는 동안 책장 머리줄로 옮겨 온다. 펼친 월 폴더 위에 겹치지 않는다. */
.shelf-heading .shelf-fold{position:static;order:-1;margin-right:auto;box-shadow:none;font-size:11px;padding:8px 10px}
