/* Marigold's Story Garden — child bookshelf (my-shelf). Builds on storybook.css. */
.sh-me{flex-direction:row;align-items:center;gap:1.1rem;margin:.4rem 0 1.2rem;padding:1rem 1.4rem}
.sh-avatar{width:88px;height:88px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 3px var(--gold-lo),0 0 18px rgba(255,214,120,.8);flex-shrink:0}
.sh-who{flex:1;min-width:0}
.sh-name{margin:0;font:400 clamp(1.7rem,3.4vw,2.6rem)/1.05 var(--sb-script);background:linear-gradient(180deg,#f7a8c4,#e04a8a 30%,#c2185b 65%,#b3135a);-webkit-background-clip:text;background-clip:text;color:transparent;padding:.1em 0}
.sh-stats{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.3rem}
.sh-stats span{display:inline-flex;align-items:center;gap:.3rem;padding:.35rem .75rem;border-radius:999px;background:#fff;border:2px solid #f3d9b0;font:800 .95rem/1 var(--font-body);color:#7d1550}
.sh-stats svg{width:1.2rem;height:1.2rem}
.sh-picker{margin:-.4rem 0 1.2rem;align-items:center;text-align:center}
.sh-picker h2{margin:0 0 .6rem;font:400 1.8rem/1.1 var(--sb-script);color:#c2185b}
.sh-readers{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;margin-bottom:1rem}
.sh-reader{display:flex;flex-direction:column;align-items:center;gap:.3rem;border:0;background:#fff;border-radius:20px;padding:.6rem .8rem;cursor:pointer;border:2px solid #f3d9b0;font:800 .95rem/1.1 var(--font-body);color:#5a2a82;min-width:6.5rem}
.sh-reader img{width:58px;height:58px;border-radius:50%}
.sh-reader[aria-pressed="true"]{border-color:#e04a8a;box-shadow:0 0 0 3px #ffc4e4}
.sh-new{display:flex;flex-direction:column;align-items:center;gap:.6rem;border-top:2px dotted #edc98a;padding-top:.9rem;width:100%}
.sh-new label{font:800 .95rem/1 var(--font-body);color:#5a2a82;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;justify-content:center}
.sh-new input{font:700 1rem var(--font-body);padding:.55rem .9rem;border-radius:999px;border:2px solid #d9bff0;min-width:12rem}
.sh-avs{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:center}
.sh-avs button{border:3px solid transparent;border-radius:50%;padding:0;background:none;cursor:pointer;width:56px;height:56px}
.sh-avs button img{width:100%;height:100%;border-radius:50%}
.sh-avs button[aria-checked="true"]{border-color:#e04a8a;box-shadow:0 0 12px rgba(224,74,138,.8)}

/* the bookcase */
.sh-case{position:relative;padding:3.2rem 1.4rem 1.4rem;border-radius:34px 34px 20px 20px;
  background:linear-gradient(180deg,rgba(80,40,20,.0),rgba(0,0,0,.15)),repeating-linear-gradient(90deg,#8a5528 0 46px,#82502a 46px 92px),#8a5528;
  border:6px solid #5e3416;box-shadow:0 0 0 3px var(--gold-hi),inset 0 0 40px rgba(30,10,0,.6),0 20px 40px rgba(20,0,30,.55)}
.sh-case::before{content:"";position:absolute;left:4%;right:4%;top:.4rem;height:22px;background:radial-gradient(circle,#fff6c8 0 3px,transparent 4px) 0 50%/38px 22px repeat-x;filter:drop-shadow(0 0 6px #ffe08a);opacity:.9}
.sh-sign{position:absolute;left:50%;top:-1.3rem;transform:translateX(-50%);padding:.45rem 1.6rem;border-radius:999px;background:linear-gradient(180deg,#fff9ee,#fde4cf);border:3px solid var(--gold-lo);box-shadow:0 0 0 3px var(--gold-hi),0 6px 14px rgba(30,0,40,.4)}
.sh-sign span{font:400 1.7rem/1 var(--sb-script);color:#c2185b;white-space:nowrap}
.sh-shelf{position:relative;display:flex;align-items:flex-end;gap:.5rem;min-height:290px;padding:0 1rem;overflow-x:auto;overflow-y:visible;scrollbar-width:thin;
  background:linear-gradient(180deg,rgba(40,15,5,.55),rgba(40,15,5,.25));border-radius:14px 14px 0 0}
.sh-shelf::after{content:"";position:sticky;flex:0 0 0}
.sh-plank{height:26px;margin:0 -.6rem;border-radius:6px;background:linear-gradient(180deg,#c98a4a,#9a6028 55%,#6e3f17);box-shadow:0 8px 14px rgba(0,0,0,.45);position:relative}
.sh-plank::before{content:"";position:absolute;left:3%;right:3%;top:-12px;height:16px;background:radial-gradient(ellipse at 50% 100%,#4f9e44 0 40%,transparent 42%) 0 0/34px 16px repeat-x;opacity:.9}

/* spines */
.sh-spine{position:relative;flex:0 0 auto;width:var(--w,62px);height:var(--h,250px);margin-top:20px;border:0;padding:0;cursor:pointer;border-radius:6px 6px 3px 3px;
  background:linear-gradient(90deg,rgba(0,0,0,.28),rgba(255,255,255,.18) 18%,rgba(255,255,255,0) 40%,rgba(0,0,0,.22)),linear-gradient(180deg,var(--c2),var(--c1));
  box-shadow:inset 0 0 0 2px rgba(255,224,138,.75),3px 0 6px rgba(0,0,0,.4);transition:transform .45s cubic-bezier(.3,1.4,.5,1);transform-origin:50% 100%;-webkit-tap-highlight-color:transparent}
.sh-spine:hover{transform:translateY(-8px)}
.sh-spine.pulled{transform:translateY(-36px) rotate(-4deg)}
.sh-spine::before,.sh-spine::after{content:"";position:absolute;left:0;right:0;height:7px;background:linear-gradient(180deg,#ffe08a,#d9961c);}
.sh-spine::before{top:14px}.sh-spine::after{bottom:14px}
.sh-spine .ico{position:absolute;left:50%;top:28px;transform:translateX(-50%);width:34px;height:34px}
.sh-spine .t{position:absolute;left:0;right:0;top:70px;bottom:28px;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;transform:rotate(180deg);
  font:400 1.12rem/1 var(--sb-script);color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5),0 0 8px rgba(255,200,230,.6);white-space:nowrap;overflow:hidden}
.sh-spine .rd{position:absolute;left:50%;bottom:26px;transform:translateX(-50%);font:800 .68rem/1 var(--font-body);color:#fff;background:rgba(0,0,0,.3);padding:.2rem .35rem;border-radius:99px;white-space:nowrap}
.sh-spine.img{background:var(--img) center/100% 100% no-repeat}
.sh-spine.img .t,.sh-spine.img .ico,.sh-spine.img::before,.sh-spine.img::after{display:none}
.sh-ghost{flex:0 0 auto;width:58px;height:220px;border-radius:6px;border:3px dashed rgba(255,230,180,.45);display:flex;align-items:center;justify-content:center;color:rgba(255,240,210,.75);font:800 .72rem/1.2 var(--font-body);writing-mode:vertical-rl;transform:rotate(180deg);text-align:center}
.sh-deco{flex:0 0 auto;width:96px;height:auto;align-self:flex-end;filter:drop-shadow(0 4px 6px rgba(0,0,0,.4))}
.sh-deco.lean{width:70px}
.sh-empty{flex-direction:row;align-items:center;gap:1rem;margin-top:1.2rem}
.sh-empty img{width:110px;height:auto;flex-shrink:0}
.sh-empty h2{margin:0 0 .3rem;font:400 1.8rem/1.1 var(--sb-script);color:#c2185b}
.sh-empty p{font:600 1.05rem/1.45 var(--sb-serif);color:var(--sb-ink)}

/* cover peek after pulling a spine */
.sh-peek{position:fixed;inset:0;z-index:300;display:grid;place-items:center;background:rgba(30,8,50,.6);backdrop-filter:blur(4px);perspective:1400px}
.sh-peek-book{display:flex;flex-direction:column;align-items:center;gap:1rem;animation:sh-tip .7s cubic-bezier(.3,1.3,.5,1)}
@keyframes sh-tip{from{transform:rotateX(70deg) translateY(40px);opacity:0}to{transform:none;opacity:1}}
.sh-peek .sb-closed{width:min(78vw,340px);transform:rotateY(-10deg)}
.sh-peek .rowb{display:flex;gap:.7rem;flex-wrap:wrap;justify-content:center}
.sh-peek .opening-msg{font:400 1.5rem/1 var(--sb-script);color:#fff;text-shadow:0 2px 0 #8e1050}
.sh-note{text-align:center;color:rgba(255,240,250,.8);font:700 .85rem var(--font-body);margin-top:1rem}

@media (max-width:640px){
  .sh-me{flex-wrap:wrap;padding:1rem}
  .sh-avatar{width:68px;height:68px}
  .sh-actions{width:100%;display:flex;justify-content:center}
  .sh-case{padding:3rem .7rem 1rem}
  .sh-shelf{min-height:250px;padding:0 .5rem}
  .sh-spine{--h:220px}
  .sh-empty{flex-direction:column;text-align:center}
}
@media (prefers-reduced-motion:reduce){.sh-spine{transition:none}.sh-peek-book{animation:none}}

/* Read buttons under the shelf */
.sh-readlist{margin-top:1.4rem;padding:1.1rem 1.2rem;border-radius:26px;background:linear-gradient(180deg,rgba(255,249,238,.96),rgba(253,228,207,.96));border:3px solid var(--gold-lo);box-shadow:0 0 0 3px var(--gold-hi),0 12px 28px rgba(30,0,40,.4);display:grid;gap:.8rem}
.sh-readlist h2{margin:0;font:400 1.7rem/1.1 var(--sb-script);color:#c2185b;text-align:center}
.sh-rbook{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap}
.sh-rbook img{width:56px;height:auto;border-radius:6px;border:2px solid var(--gold-lo);object-fit:cover;flex-shrink:0}
.sh-rbook .t{flex:1;min-width:140px;display:grid;gap:.15rem}
.sh-rbook .t b{font:700 1.05rem/1.2 var(--sb-serif);color:var(--sb-ink)}
.sh-rbook .t small{font:700 .85rem/1.2 var(--font-body);color:#7a5a8a}
.sh-rbook .sb-pill{min-height:3rem}
@media (max-width:520px){.sh-rbook .sb-pill{width:100%}}
