/* Vertical walnut wall shelf — accordion drawers, compact stack */

.wall-shelf-scene{
  position:relative;margin-top:.75rem;
  border-radius:24px;overflow:hidden;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 40px 100px rgba(0,0,0,.5);
  max-height:75vh;
  min-height:min(520px,75vh);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);
}
@container (max-width:960px){.wall-shelf-scene{grid-template-columns:minmax(0,1fr);max-height:none;min-height:auto}}

.wall-shelf-gl{
  position:absolute;inset:0;width:100%;height:100%;
  pointer-events:none;z-index:0;opacity:.85;
}

.wall-shelf{
  position:relative;z-index:1;display:contents;
}

.wall-shelf__cabinet{
  position:relative;z-index:1;
  grid-column:1;grid-row:1;
  display:flex;flex-direction:column;
  max-height:75vh;min-height:min(520px,75vh);
  background:
    linear-gradient(90deg,rgba(0,0,0,.35),transparent 8%,transparent 92%,rgba(0,0,0,.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"),
    linear-gradient(175deg,#5c3d28 0%,#4a3222 15%,#3d2817 40%,#2a1810 100%);
  border-right:1px solid rgba(255,255,255,.06);
}
@container (max-width:960px){.wall-shelf__cabinet{max-height:none;min-height:55vh;border-right:none;border-bottom:1px solid rgba(255,255,255,.06)}}

.wall-shelf__cabinet-edge{
  height:14px;flex-shrink:0;
  background:linear-gradient(180deg,#6b4a32,#3d2817);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.15),0 4px 12px rgba(0,0,0,.35);
}
.wall-shelf__cabinet-edge--foot{box-shadow:inset 0 -2px 0 rgba(0,0,0,.3)}

.wall-shelf__scroll{
  flex:1;overflow-y:auto;overflow-x:hidden;
  padding:.85rem 1rem 1.25rem;
  scroll-behavior:smooth;
  overscroll-behavior:contain;
}
.wall-shelf__scroll::-webkit-scrollbar{width:8px}
.wall-shelf__scroll::-webkit-scrollbar-track{background:rgba(0,0,0,.25);border-radius:6px}
.wall-shelf__scroll::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#8b6914,#5c4030);border-radius:6px}

/* —— Drawer (collapsed) —— */
.wall-shelf__tier{
  margin-bottom:.65rem;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 4px 16px rgba(0,0,0,.25);
}

.wall-shelf__drawer-head{
  width:100%;display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;gap:.75rem;
  padding:.65rem .85rem .7rem;
  border:none;cursor:pointer;text-align:left;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='40' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"),
    linear-gradient(180deg,#6b4a32,#4a3222 50%,#3d2817);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 -2px 6px rgba(0,0,0,.35);
  transition:filter .2s;
}
.wall-shelf__drawer-head:hover{filter:brightness(1.06)}
.wall-shelf__tier.is-open .wall-shelf__drawer-head{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 2px 0 var(--as-accent);
}

.wall-shelf__carve{
  font-family:Georgia,'Times New Roman',serif;
  font-size:clamp(1.1rem,2.5vw,1.45rem);
  font-weight:700;letter-spacing:.18em;
  color:#2a1810;
  text-shadow:0 1px 0 rgba(255,255,255,.25),0 -1px 1px rgba(0,0,0,.9),1px 1px 0 rgba(0,0,0,.4);
  min-width:5.5rem;
}

.wall-shelf__peek{
  display:flex;align-items:flex-end;justify-content:flex-end;
  gap:3px;min-height:44px;padding:.25rem 0;
  overflow:hidden;
}
.wall-shelf__peek-edge{
  width:7px;height:38px;flex-shrink:0;border-radius:1px 2px 2px 1px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--spine-color,#555) 70%,#000),var(--spine-color,#555));
  box-shadow:1px 2px 4px rgba(0,0,0,.45);
  opacity:.85;
}
.wall-shelf__tier.is-open .wall-shelf__peek-edge{opacity:.35;height:32px}
.wall-shelf__peek-more{
  font-size:.65rem;color:#f5ecd7;opacity:.7;padding-left:.35rem;align-self:center;
}

.wall-shelf__badge{
  font-family:var(--as-font-mono,IBM Plex Mono,monospace);
  font-size:.72rem;color:#f5ecd7;opacity:.75;
  padding:.2rem .45rem;border-radius:6px;
  background:rgba(0,0,0,.25);
}

/* —— Expanded body —— */
.wall-shelf__body{
  display:grid;grid-template-rows:0fr;
  transition:grid-template-rows .45s cubic-bezier(.4,0,.2,1);
}
.wall-shelf__tier.is-open .wall-shelf__body{grid-template-rows:1fr}
.wall-shelf__body-inner{overflow:hidden;min-height:0}
.wall-shelf__body-inner .wall-shelf__plank:first-child{margin-top:.5rem}

.wall-shelf__plank{
  height:12px;border-radius:3px;margin:0 .65rem .4rem;
  background:linear-gradient(180deg,#7a5538 0%,#4a3222 40%,#2f1f14 100%);
  box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 2px 0 rgba(255,255,255,.15);
}
.wall-shelf__plank--lower{margin:.5rem .65rem .65rem}

.wall-shelf__row{
  display:grid;
  grid-template-columns:repeat(auto-fill,var(--wall-spine-w,46px));
  gap:8px;
  justify-content:start;
  align-items:end;
  min-height:calc(var(--wall-spine-h,210px) + 8px);
  padding:.55rem .65rem;
  margin:0 .45rem;
  background:
    repeating-linear-gradient(90deg,transparent,transparent 3px,rgba(0,0,0,.06) 3px,rgba(0,0,0,.06) 4px),
    linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.28));
  border-radius:6px;
  box-shadow:inset 0 10px 28px rgba(0,0,0,.35);
  animation:wallDrawerIn .4s ease;
}
@keyframes wallDrawerIn{
  from{opacity:0;transform:translateY(-8px)}
  to{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
  .wall-shelf__body{transition:none}
  .wall-shelf__row{animation:none}
}

.wall-spine{
  width:var(--wall-spine-w,46px);
  height:var(--wall-spine-h,210px);
  padding:0;border:none;cursor:pointer;
  border-radius:2px 3px 3px 2px;
  background:linear-gradient(105deg,rgba(255,255,255,.12),transparent 35%),
    linear-gradient(90deg,color-mix(in srgb,var(--spine-color,#555) 75%,#000),var(--spine-color,#555));
  box-shadow:2px 4px 10px rgba(0,0,0,.5),inset -1px 0 0 rgba(255,255,255,.08);
  transition:transform .2s ease,box-shadow .2s;
  position:relative;
}
.wall-spine:hover{transform:translateY(-10px);z-index:2}
.wall-spine.is-active{
  transform:translateY(-14px);
  outline:2px solid var(--as-accent);
  outline-offset:3px;
  box-shadow:0 16px 36px color-mix(in srgb,var(--as-accent) 35%,transparent);
}

.wall-spine__text{
  position:absolute;inset:6px 4px;
  writing-mode:vertical-rl;text-orientation:mixed;
  display:flex;flex-direction:column;justify-content:space-between;
  font-size:.6rem;line-height:1.12;color:rgba(255,255,255,.94);
  text-shadow:0 1px 2px rgba(0,0,0,.65);
  overflow:hidden;text-align:left;
}
.wall-spine__title{font-weight:700;max-height:72%}
.wall-spine__year{
  font-family:var(--as-font-mono,IBM Plex Mono,monospace);
  font-size:.55rem;opacity:.88;
}

.wall-shelf__detail{
  grid-column:2;grid-row:1;
  position:sticky;z-index:1;top:5rem;align-self:start;
  margin:1rem 1rem 1rem 0;
  padding:1.25rem;border-radius:18px;
  background:color-mix(in srgb,var(--as-bg) 82%,rgba(0,0,0,.6));
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(12px);
  min-height:240px;
  max-height:calc(75vh - 2rem);overflow:auto;
}
@container (max-width:960px){
  .wall-shelf__detail{
    grid-column:1;grid-row:2;position:relative;top:0;margin:0;
    border-radius:0 0 24px 24px;max-height:none;
  }
}

.wall-shelf__meta{font-size:.82rem;opacity:.65;margin:0 0 1rem}
