/* ============================================================
   SHARE SHELF — desktop layer + wooden bookshelf
   Loads AFTER styles.css + discover.css + community.css + profile.css
   ============================================================ */

.share { position: relative; min-height: 100vh; isolation: isolate; }
.share .grain { position: fixed; }

.sh-wrap { max-width: 1080px; margin: 0 auto; padding: 0 40px 90px; }

.sh-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--seafoam-dim); text-decoration: none;
  margin: 26px 0 18px; white-space: nowrap;
}
.sh-back:hover { color: var(--seaglass); }

.sh-head { text-align: center; margin-bottom: 18px; }
.sh-head .eyebrow { display: block; margin-bottom: 12px; }
.sh-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(42px, 4.6vw, 64px); line-height: 1; }
.sh-sub { font-family: var(--font-body); font-style: italic; font-size: 19px; color: var(--seafoam); margin-top: 12px; }

/* owner banner (shown when a friend opens the link) */
.sh-owner {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  margin: 0 auto 26px; width: fit-content;
  background: var(--fog-soft); border: 1px solid var(--fog);
  border-radius: var(--r-pill); padding: 10px 20px 10px 12px;
}
.sh-owner .ava { width: 38px; height: 38px; font-size: 14px; }
.sh-owner-txt { font-family: var(--font-ui); font-size: 13px; color: var(--seafoam); }
.sh-owner-txt b { color: var(--parchment); font-weight: 700; }

/* shelf picker */
.sh-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 36px; }
.sh-pick {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--seafoam); background: var(--fog-soft);
  border: 1px solid var(--fog); border-radius: var(--r-pill);
  padding: 9px 17px; cursor: pointer; white-space: nowrap; transition: all .2s;
}
.sh-pick:hover { color: var(--parchment); border-color: var(--seafoam-dim); }
.sh-pick[aria-selected="true"] { color: var(--abyss); background: var(--amber); border-color: var(--amber); }

/* ============================================================
   WOODEN BOOKCASE
   ============================================================ */
.bookcase {
  position: relative;
  padding: 26px 30px 0;
  border-radius: 16px;
  background:
    /* plank grain */
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(88deg, rgba(255,240,210,0.035) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, #4a3422 0%, #3c2a1b 50%, #321f12 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,225,180,0.12),
    inset 0 -4px 14px rgba(0,0,0,0.51),
    0 50px 90px -40px rgba(0,0,0,0.86);
  border: 1px solid #1f140b;
}
.bookcase::before, .bookcase::after { /* side frames */
  content: ""; position: absolute; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, #2a1b10, #4a3422 60%, #2a1b10);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.51);
}
.bookcase::before { left: 0; border-radius: 16px 0 0 16px; }
.bookcase::after { right: 0; border-radius: 0 16px 16px 0; }

.shelf-tier { position: relative; margin: 0 4px; }
/* the books sit on the plank */
.tier-books {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  padding: 6px 14px 0;
  align-items: end;
  min-height: 240px;
}
@media (max-width: 760px) { .tier-books { grid-template-columns: repeat(3, 1fr); } }

/* the wooden plank / ledge under each row */
.tier-plank {
  height: 26px; margin: 14px 0 30px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.09) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #5a4129 0%, #3a2716 60%, #271a0f 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,225,180,0.18),
    0 10px 18px -6px rgba(0,0,0,0.68),
    0 2px 0 rgba(0,0,0,0.51);
  border-top: 1px solid rgba(255,225,180,0.1);
}

/* a forward-facing book cover standing on the shelf */
.cover-book {
  position: relative; aspect-ratio: 2/3; cursor: pointer;
  border-radius: 3px 5px 5px 3px;
  transition: transform .28s cubic-bezier(.34,1.4,.5,1);
  transform-origin: bottom center;
  box-shadow: -6px 10px 16px -6px rgba(0,0,0,0.68);
}
.cover-book:hover { transform: translateY(-12px) rotate(-1deg); box-shadow: -8px 18px 26px -8px rgba(0,0,0,0.8); }
.cover-book .face {
  position: absolute; inset: 0; border-radius: 3px 5px 5px 3px;
  overflow: hidden; border: 1px solid rgba(0,0,0,0.51);
}
.cover-book .face .ph { width: 100%; height: 100%; }
/* spine shadow on the left edge */
.cover-book .face::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 9px;
  background: linear-gradient(90deg, rgba(0,0,0,0.51), rgba(0,0,0,0.06));
  z-index: 2;
}
/* glossy sheen */
.cover-book .face::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(115deg, rgba(255,255,255,0.14) 0%, transparent 22%, transparent 100%);
}
.cover-book .ttl {
  position: absolute; z-index: 4; left: 12px; right: 10px; top: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.08;
  color: var(--parchment); text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.cover-book .ath {
  position: absolute; z-index: 4; left: 12px; right: 10px; bottom: 12px;
  font-family: var(--font-ui); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(236,227,210,0.8); text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.cover-book .rate { position: absolute; z-index: 4; left: 12px; bottom: 28px; color: var(--amber); font-size: 11px; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0,0,0,0.68); }

/* tooltip on hover */
.cover-book .tip {
  position: absolute; z-index: 6; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--parchment); color: var(--abyss);
  font-family: var(--font-ui); font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 6px 12px; border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.cover-book:hover .tip { opacity: 1; }

.tier-label { font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,225,180,0.55); padding: 0 16px 2px; }

/* ============================================================
   Share link bar
   ============================================================ */
.sh-linkcard {
  max-width: 720px; margin: 40px auto 0;
  background: var(--tide); border: 1px solid var(--fog);
  border-radius: var(--r-lg); padding: 30px 34px 32px; text-align: center;
}
.sh-linkcard h3 { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.sh-linkcard p { font-family: var(--font-body); font-size: 15px; color: var(--seafoam); margin-top: 8px; }
.sh-linkrow { display: flex; gap: 10px; margin-top: 22px; }
@media (max-width: 560px) { .sh-linkrow { flex-direction: column; } }
.sh-linkfield {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--fog-soft); border: 1px solid var(--fog);
  border-radius: var(--r-sm); padding: 0 6px 0 16px; min-width: 0;
}
.sh-linkfield svg { width: 16px; height: 16px; color: var(--seafoam-dim); flex: none; }
.sh-linkfield input {
  flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 13.5px;
  color: var(--seaglass); background: transparent; border: none; outline: none; padding: 14px 0;
}
.sh-copy {
  flex: none; font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--abyss); background: var(--amber); border: none;
  border-radius: var(--r-sm); padding: 12px 22px; cursor: pointer; white-space: nowrap;
  transition: box-shadow .2s, background .2s;
}
.sh-copy:hover { box-shadow: 0 8px 22px -8px var(--amber-glow); }
.sh-copy.done { background: var(--seaglass); }

.sh-socials { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.sh-social {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--fog); background: var(--fog-soft); color: var(--parchment);
  font-family: var(--font-ui); font-size: 16px; font-weight: 700;
  transition: border-color .2s, color .2s, transform .2s;
}
.sh-social:hover { border-color: var(--seaglass); color: var(--seaglass); transform: translateY(-3px); }

.sh-vis-note { font-family: var(--font-ui); font-size: 12px; color: var(--seafoam-dim); margin-top: 22px; display: inline-flex; align-items: center; gap: 7px; }

/* friend-view CTA (when viewing someone's shared shelf) */
.sh-friend-cta { display: flex; justify-content: center; gap: 14px; margin-top: 36px; }
.sh-friend-cta .btn { padding: 14px 28px; }
