
.city-bookshelf-page{
  min-height:100vh;
}

.bookshelf-main{
  width:min(1240px,calc(100% - 32px));
  margin:28px auto 0;
}

.bookshelf-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:36px;
  align-items:center;
  padding:clamp(28px,5vw,58px);
  background:
    radial-gradient(circle at 82% 24%,rgba(255,95,210,.22),transparent 34%),
    radial-gradient(circle at 18% 0,rgba(41,231,255,.20),transparent 40%),
    linear-gradient(145deg,rgba(14,26,62,.98),rgba(5,10,25,.97));
}

.bookshelf-hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:7px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(41,231,255,.85) 18%,
      rgba(212,107,255,.92) 50%,
      rgba(255,95,210,.88) 82%,
      transparent
    );
  box-shadow:0 0 24px rgba(41,231,255,.35);
}

.bookshelf-location{
  margin:12px 0 0;
  color:var(--cyan);
  font-family:"Press Start 2P",monospace;
  font-size:clamp(13px,1.8vw,19px);
  letter-spacing:.05em;
}

.bookshelf-hero h1{
  max-width:820px;
  margin:14px 0 18px;
  font-size:clamp(44px,7vw,88px);
  line-height:.94;
  letter-spacing:-.055em;
}

.bookshelf-lede{
  max-width:820px;
  margin:0;
  color:#d9f6ff;
  font-size:clamp(18px,2vw,22px);
}

.bookshelf-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.bookshelf-city-mark{
  position:relative;
  display:flex;
  min-height:310px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  border:1px solid rgba(41,231,255,.42);
  border-radius:30px;
  background:
    linear-gradient(180deg,rgba(3,9,24,.68),rgba(4,10,24,.94)),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(41,231,255,.06) 18px 19px
    );
  box-shadow:
    inset 0 0 45px rgba(41,231,255,.08),
    0 0 38px rgba(255,95,210,.14);
}

.bookshelf-city-mark::before,
.bookshelf-city-mark::after{
  content:"";
  position:absolute;
  width:68%;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--cyan),transparent);
  box-shadow:0 0 12px var(--cyan);
}

.bookshelf-city-mark::before{
  top:27px;
}

.bookshelf-city-mark::after{
  bottom:27px;
}

.bookshelf-city-mark span{
  color:#ffffff;
  font-family:"Press Start 2P",monospace;
  font-size:clamp(48px,6vw,76px);
  text-shadow:
    0 0 12px rgba(255,255,255,.72),
    0 0 24px rgba(41,231,255,.48);
}

.bookshelf-city-mark strong{
  margin-top:18px;
  color:var(--yellow);
  font-family:"Press Start 2P",monospace;
  font-size:25px;
  letter-spacing:.08em;
}

.bookshelf-city-mark em{
  margin-top:18px;
  color:var(--muted);
  font-style:normal;
  font-weight:900;
  letter-spacing:.16em;
}

.bookshelf-sponsor-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin:20px 0;
  padding:18px 22px;
  border-color:rgba(212,107,255,.48);
  background:
    linear-gradient(90deg,rgba(212,107,255,.10),rgba(5,10,24,.92) 44%);
}

.bookshelf-sponsor-strip p{
  max-width:820px;
  margin:4px 0 0;
  color:var(--muted);
}

.bookshelf-sponsor-kicker{
  display:block;
  margin-bottom:4px;
  color:var(--yellow);
  font-family:"Press Start 2P",monospace;
  font-size:10px;
}

.bookshelf-sponsor-strip strong{
  font-size:18px;
}

.bookshelf-sponsor-action{
  flex:0 0 auto;
  border-color:rgba(212,107,255,.72);
  color:var(--yellow);
  background:rgba(212,107,255,.10);
}

.bookshelf-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:20px;
}

.bookshelf-stat{
  padding:18px 20px;
  overflow:visible;
}

.bookshelf-stat span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.bookshelf-stat strong{
  display:block;
  margin-top:6px;
  color:#ffffff;
  font-size:32px;
  line-height:1;
}

.city-story-shelf{
  padding:clamp(20px,3vw,34px);
  overflow:visible;
}

.bookshelf-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(380px,.62fr);
  gap:30px;
  align-items:end;
  padding-bottom:24px;
  border-bottom:1px solid var(--line);
}

.bookshelf-section-head h2,
.bookshelf-about h2{
  margin:8px 0 10px;
  font-size:clamp(32px,4.6vw,54px);
  line-height:1;
  letter-spacing:-.04em;
}

.bookshelf-section-head p{
  max-width:760px;
  margin:0;
  color:var(--muted);
}

.bookshelf-tools{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:10px;
}

.bookshelf-tools label{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.bookshelf-tools input,
.bookshelf-tools select{
  min-height:44px;
  margin-top:6px;
}

.bookshelf-loading{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:240px;
  color:#d9f6ff;
  font-weight:800;
}

.bookshelf-spinner{
  width:24px;
  height:24px;
  border:3px solid rgba(41,231,255,.18);
  border-top-color:var(--cyan);
  border-radius:50%;
  animation:bookshelf-spin .85s linear infinite;
}

@keyframes bookshelf-spin{
  to{transform:rotate(360deg)}
}

.bookshelf-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px 18px;
  padding-top:28px;
}

.bookshelf-card{
  position:relative;
  display:flex;
  min-height:500px;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(94,230,255,.27);
  border-radius:22px 22px 16px 16px;
  background:
    linear-gradient(180deg,rgba(13,23,52,.97),rgba(5,10,24,.99));
  box-shadow:
    0 18px 38px rgba(0,0,0,.30),
    inset 0 0 24px rgba(41,231,255,.035);
}

.bookshelf-card::after{
  content:"";
  position:absolute;
  left:-8px;
  right:-8px;
  bottom:-8px;
  height:13px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    rgba(41,231,255,.15),
    rgba(212,107,255,.70),
    rgba(255,95,210,.20)
  );
  box-shadow:0 8px 18px rgba(0,0,0,.58),0 0 14px rgba(212,107,255,.22);
}

.bookshelf-cover{
  position:relative;
  min-height:210px;
  padding:23px 22px 26px 30px;
  overflow:hidden;
  border-bottom:1px solid rgba(94,230,255,.22);
  background:
    radial-gradient(circle at 80% 14%,rgba(255,95,210,.30),transparent 34%),
    radial-gradient(circle at 16% 88%,rgba(41,231,255,.25),transparent 35%),
    linear-gradient(145deg,#0b1532,#071025 72%);
}

.bookshelf-card:nth-child(3n+2) .bookshelf-cover{
  background:
    radial-gradient(circle at 14% 12%,rgba(212,107,255,.30),transparent 32%),
    radial-gradient(circle at 82% 88%,rgba(41,231,255,.24),transparent 36%),
    linear-gradient(145deg,#0d1734,#050b1d 72%);
}

.bookshelf-card:nth-child(3n+3) .bookshelf-cover{
  background:
    radial-gradient(circle at 82% 18%,rgba(41,231,255,.28),transparent 34%),
    radial-gradient(circle at 12% 84%,rgba(255,95,210,.22),transparent 34%),
    linear-gradient(145deg,#091b34,#050a19 72%);
}

.bookshelf-cover::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:12px;
  width:5px;
  background:linear-gradient(180deg,var(--cyan),var(--yellow),var(--pink));
  box-shadow:0 0 14px rgba(41,231,255,.40);
}

.bookshelf-cover-city{
  display:block;
  color:var(--cyan);
  font-family:"Press Start 2P",monospace;
  font-size:9px;
  letter-spacing:.06em;
}

.bookshelf-cover h3{
  position:relative;
  z-index:1;
  margin:26px 0 12px;
  color:#ffffff;
  font-size:clamp(23px,2.5vw,32px);
  line-height:1.02;
  letter-spacing:-.035em;
}

.bookshelf-cover-author{
  position:relative;
  z-index:1;
  color:#d9f6ff;
  font-size:14px;
  font-weight:800;
}

.bookshelf-cover-pixel{
  position:absolute;
  right:21px;
  bottom:18px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#ffffff;
  box-shadow:
    0 0 4px rgba(255,255,255,.95),
    0 0 10px rgba(41,231,255,.72);
}

.bookshelf-card-body{
  display:flex;
  flex:1;
  flex-direction:column;
  padding:20px;
}

.bookshelf-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:13px;
}

.bookshelf-chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  border:1px solid rgba(212,107,255,.38);
  border-radius:999px;
  color:var(--yellow);
  background:rgba(212,107,255,.08);
  font-size:11px;
  font-weight:900;
}

.bookshelf-byline{
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
}

.bookshelf-byline a{
  color:var(--cyan);
  font-weight:900;
  text-decoration:none;
}

.bookshelf-card-summary{
  margin:0 0 14px;
  color:#d6eff7;
}

.bookshelf-relationship{
  margin:0 0 15px;
  padding:11px 12px;
  border-left:3px solid var(--cyan);
  border-radius:0 12px 12px 0;
  color:var(--muted);
  background:rgba(41,231,255,.055);
  font-size:13px;
}

.bookshelf-card-metrics{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:auto;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.bookshelf-card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:17px;
}

.bookshelf-card-actions .btn{
  min-height:40px;
  padding:8px 12px;
  font-size:12px;
}

.bookshelf-empty,
.bookshelf-error{
  display:flex;
  min-height:220px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:28px;
  text-align:center;
  color:var(--muted);
}

.bookshelf-error{
  color:#ffdbe2;
}

.bookshelf-load-more-wrap{
  display:flex;
  justify-content:center;
  padding-top:26px;
}

.bookshelf-about{
  display:grid;
  grid-template-columns:.75fr 1.25fr;
  gap:34px;
  align-items:start;
  margin:20px 0 0;
  padding:clamp(24px,4vw,42px);
}

.bookshelf-about-copy{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}

.bookshelf-about-copy p{
  margin:0;
  color:#d6eff7;
  font-size:17px;
}

@media(max-width:980px){
  .bookshelf-hero,
  .bookshelf-section-head,
  .bookshelf-about{
    grid-template-columns:1fr;
  }

  .bookshelf-city-mark{
    min-height:230px;
  }

  .bookshelf-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .bookshelf-section-head{
    align-items:start;
  }
}

@media(max-width:720px){
  .bookshelf-main{
    width:min(100% - 20px,1240px);
    margin-top:14px;
  }

  .bookshelf-hero{
    gap:22px;
    padding:24px 19px 32px;
  }

  .bookshelf-hero h1{
    font-size:42px;
  }

  .bookshelf-city-mark{
    min-height:190px;
  }

  .bookshelf-sponsor-strip{
    align-items:flex-start;
    flex-direction:column;
  }

  .bookshelf-stats,
  .bookshelf-grid,
  .bookshelf-tools,
  .bookshelf-about-copy{
    grid-template-columns:1fr;
  }

  .bookshelf-card{
    min-height:0;
  }

  .city-story-shelf{
    padding:19px 15px 24px;
  }
}


/* === Step 137A1: respect dynamic hidden states ===
   The bookshelf JavaScript was successfully loading the API data, but
   class display rules were overriding the browser's hidden attribute. */
.city-bookshelf-page [hidden]{
  display:none!important;
}


/* === Step 138: reusable city bookshelf system === */
.bookshelf-claim-story-link{
  display:inline-flex;
  width:fit-content;
  margin-top:8px;
  color:var(--yellow);
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.bookshelf-claim-story-link:hover,
.bookshelf-claim-story-link:focus-visible{
  color:#ffffff;
  text-decoration:underline;
}


/* === Step 141: reusable author presence on city bookshelves === */
.bookshelf-authors{
  margin:0 0 20px;
  padding:clamp(22px,3vw,34px);
  overflow:visible;
  border-color:rgba(212,107,255,.34);
  background:
    radial-gradient(
      circle at 92% 4%,
      rgba(212,107,255,.13),
      transparent 33%
    ),
    linear-gradient(
      145deg,
      rgba(12,22,50,.97),
      rgba(5,10,24,.98)
    );
}

.bookshelf-authors-head{
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
}

.bookshelf-authors-head h2{
  margin:8px 0 10px;
  font-size:clamp(30px,4vw,48px);
  line-height:1;
  letter-spacing:-.04em;
}

.bookshelf-authors-head p{
  max-width:760px;
  margin:0;
  color:var(--muted);
}

.bookshelf-author-grid{
  display:grid;
  grid-template-columns:
    repeat(auto-fit,minmax(320px,390px));
  gap:16px;
  justify-content:start;
  padding-top:22px;
}

.bookshelf-author-card{
  display:grid;
  grid-template-columns:94px minmax(0,1fr);
  gap:17px;
  align-items:start;
  min-height:240px;
  padding:18px;
  overflow:hidden;
  border:1px solid rgba(41,231,255,.24);
  border-radius:20px;
  background:
    radial-gradient(
      circle at 6% 6%,
      rgba(41,231,255,.12),
      transparent 31%
    ),
    linear-gradient(
      150deg,
      rgba(15,27,59,.97),
      rgba(5,10,24,.99)
    );
  box-shadow:
    0 14px 30px rgba(0,0,0,.25),
    inset 0 0 22px rgba(41,231,255,.025);
}

.bookshelf-author-portrait{
  position:relative;
  display:grid;
  width:94px;
  height:112px;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(212,107,255,.55);
  border-radius:16px;
  color:#ffffff;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(212,107,255,.33),
      transparent 50%
    ),
    linear-gradient(
      145deg,
      rgba(11,25,55,.98),
      rgba(3,8,20,.98)
    );
  text-decoration:none;
  box-shadow:0 0 20px rgba(212,107,255,.13);
}

.bookshelf-author-portrait img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

.bookshelf-author-initials{
  font-family:"Press Start 2P",monospace;
  font-size:24px;
  text-shadow:
    0 0 10px rgba(255,255,255,.55),
    0 0 18px rgba(41,231,255,.45);
}

.bookshelf-author-content{
  display:flex;
  min-width:0;
  flex-direction:column;
  align-items:flex-start;
}

.bookshelf-author-kicker{
  color:#d46bff;
  font-family:"Press Start 2P",monospace;
  font-size:8px;
  line-height:1.5;
}

.bookshelf-author-content h3{
  margin:8px 0 5px;
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.025em;
}

.bookshelf-author-content h3 a{
  color:#ffffff;
  text-decoration:none;
}

.bookshelf-author-content h3 a:hover,
.bookshelf-author-content h3 a:focus-visible{
  color:var(--cyan);
  text-decoration:underline;
}

.bookshelf-author-story-count{
  margin:0;
  color:var(--cyan);
  font-size:12px;
  font-weight:900;
}

.bookshelf-author-bio{
  grid-column:1/-1;
  margin:13px 0 16px;
  color:#d6eff7;
  font-size:14px;
  line-height:1.55;
}

.bookshelf-author-content .btn{
  min-height:38px;
  margin-top:auto;
  padding:8px 11px;
  font-size:11px;
}

@media(max-width:720px){
  .bookshelf-author-grid{
    grid-template-columns:1fr;
  }

  .bookshelf-author-card{
    grid-template-columns:78px minmax(0,1fr);
    padding:15px;
  }

  .bookshelf-author-portrait{
    width:78px;
    height:96px;
  }

  .bookshelf-author-content h3{
    font-size:19px;
  }
}


/* === Step 142: reusable Story Trails on city bookshelves === */
.bookshelf-trails{
  margin:0 0 20px;
  padding:clamp(22px,3vw,34px);
  overflow:visible;
  border-color:rgba(41,231,255,.31);
  background:
    radial-gradient(
      circle at 7% 5%,
      rgba(41,231,255,.12),
      transparent 34%
    ),
    radial-gradient(
      circle at 94% 6%,
      rgba(212,107,255,.12),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      rgba(8,23,48,.98),
      rgba(5,9,23,.99)
    );
}

.bookshelf-trails-head{
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
}

.bookshelf-trails-head h2{
  margin:8px 0 10px;
  font-size:clamp(30px,4vw,48px);
  line-height:1;
  letter-spacing:-.04em;
}

.bookshelf-trails-head p{
  max-width:780px;
  margin:0;
  color:var(--muted);
}

.bookshelf-trail-grid{
  display:grid;
  grid-template-columns:
    repeat(auto-fit,minmax(340px,520px));
  gap:17px;
  justify-content:start;
  padding-top:22px;
}

.bookshelf-trail-card{
  display:flex;
  min-height:300px;
  flex-direction:column;
  align-items:flex-start;
  padding:21px;
  overflow:hidden;
  border:1px solid rgba(212,107,255,.38);
  border-radius:20px;
  background:
    linear-gradient(
      90deg,
      rgba(41,231,255,.82),
      rgba(212,107,255,.86)
    ) top left / 100% 3px no-repeat,
    radial-gradient(
      circle at 90% 10%,
      rgba(212,107,255,.16),
      transparent 34%
    ),
    linear-gradient(
      150deg,
      rgba(14,27,58,.98),
      rgba(4,9,22,.99)
    );
  box-shadow:
    0 16px 34px rgba(0,0,0,.28),
    inset 0 0 24px rgba(41,231,255,.025);
}

.bookshelf-trail-topline{
  display:flex;
  width:100%;
  flex-wrap:wrap;
  gap:9px;
  align-items:center;
  justify-content:space-between;
}

.bookshelf-trail-category,
.bookshelf-trail-status{
  display:inline-flex;
  min-height:26px;
  align-items:center;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.bookshelf-trail-category{
  color:var(--cyan);
}

.bookshelf-trail-status{
  padding:5px 9px;
  border:1px solid rgba(212,107,255,.42);
  color:#efc6ff;
  background:rgba(212,107,255,.09);
}

.bookshelf-trail-status-completed{
  border-color:rgba(41,231,255,.38);
  color:#bdf8ff;
  background:rgba(41,231,255,.08);
}

.bookshelf-trail-status-paused{
  color:#d8cfff;
  opacity:.85;
}

.bookshelf-trail-card h3{
  margin:18px 0 7px;
  font-size:clamp(25px,3vw,34px);
  line-height:1.04;
  letter-spacing:-.035em;
}

.bookshelf-trail-card h3 a{
  color:#ffffff;
  text-decoration:none;
}

.bookshelf-trail-card h3 a:hover,
.bookshelf-trail-card h3 a:focus-visible{
  color:var(--cyan);
  text-decoration:underline;
}

.bookshelf-trail-byline{
  margin:0;
  color:#d46bff;
  font-size:13px;
  font-weight:900;
}

.bookshelf-trail-description{
  margin:16px 0;
  color:#d7edf5;
  font-size:15px;
  line-height:1.6;
}

.bookshelf-trail-count{
  margin:auto 0 16px;
  color:var(--cyan);
  font-size:12px;
  font-weight:900;
}

.bookshelf-trail-card .btn{
  min-height:40px;
  padding:9px 13px;
  font-size:11px;
}

@media(max-width:720px){
  .bookshelf-trail-grid{
    grid-template-columns:1fr;
  }

  .bookshelf-trail-card{
    min-height:0;
    padding:18px;
  }
}


/* === Step 146C: bookshelf filter-state cleanup === */
.bookshelf-tools[hidden],
#bookshelf-category-control[hidden]{
  display:none!important;
}

.bookshelf-tools small{
  display:block;
  max-width:260px;
  margin-top:6px;
  color:var(--muted);
  font-size:11px;
  font-weight:600;
  line-height:1.4;
}

.bookshelf-tools select:disabled,
.bookshelf-tools input:disabled{
  cursor:not-allowed;
  opacity:.55;
}

/* === Step 156D: one grouped author placement per city === */
.bookshelf-author-grid{
  grid-template-columns:repeat(auto-fit,minmax(430px,1fr));
}

.bookshelf-author-card{
  min-height:0;
}

.bookshelf-author-card.is-selected{
  border-color:rgba(255,211,91,.62);
  box-shadow:
    0 16px 34px rgba(0,0,0,.3),
    0 0 24px rgba(255,211,91,.1),
    inset 0 0 24px rgba(41,231,255,.035);
}

.bookshelf-author-featured{
  grid-column:1/-1;
  margin-top:2px;
  padding:18px;
  border:1px solid rgba(212,107,255,.32);
  border-radius:17px;
  background:
    radial-gradient(circle at 94% 4%,rgba(212,107,255,.13),transparent 34%),
    rgba(4,10,26,.62);
}

.bookshelf-author-featured-kicker{
  color:var(--yellow);
  font-family:"Press Start 2P",monospace;
  font-size:8px;
  line-height:1.6;
}

.bookshelf-author-featured h4{
  margin:10px 0 10px;
  font-size:clamp(23px,2.7vw,34px);
  line-height:1.04;
  letter-spacing:-.035em;
}

.bookshelf-author-featured h4 a{
  color:#fff;
  text-decoration:none;
}

.bookshelf-author-featured h4 a:hover,
.bookshelf-author-featured h4 a:focus-visible{
  color:var(--cyan);
  text-decoration:underline;
}

.bookshelf-author-featured-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.bookshelf-author-featured-summary{
  margin:14px 0 17px;
  color:#d6eff7;
  line-height:1.6;
}

.bookshelf-author-featured-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}

.bookshelf-author-featured-actions .btn{
  min-height:40px;
  padding:9px 13px;
  font-size:11px;
}

.bookshelf-author-other-stories{
  display:flex;
  width:100%;
  min-height:46px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:15px;
  padding:11px 14px;
  border:1px solid rgba(41,231,255,.28);
  border-radius:13px;
  color:var(--cyan);
  background:rgba(41,231,255,.055);
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.bookshelf-author-other-stories::after{
  content:"→";
  flex:0 0 auto;
  color:var(--yellow);
  font-size:18px;
}

.bookshelf-author-other-stories:hover,
.bookshelf-author-other-stories:focus-visible{
  border-color:rgba(41,231,255,.65);
  color:#fff;
  background:rgba(41,231,255,.1);
}

.bookshelf-author-only-story{
  margin:15px 0 0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.bookshelf-back-to-authors{
  display:inline-flex;
  width:fit-content;
  margin-top:14px;
  color:var(--cyan);
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.bookshelf-back-to-authors::before{
  content:"←";
  margin-right:8px;
  color:var(--yellow);
}

.bookshelf-back-to-authors:hover,
.bookshelf-back-to-authors:focus-visible{
  color:#fff;
  text-decoration:underline;
}

@media(max-width:720px){
  .bookshelf-author-grid{
    grid-template-columns:1fr;
  }
}


/* CITY PIXELS STEP 166C — EMBEDDED CITY SOUNDTRACK */

.bookshelf-soundtrack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: clamp(26px, 5vw, 54px);
  align-items: center;
  margin: 20px 0;
  padding: clamp(24px, 4.5vw, 46px);
  overflow: hidden;
  border-color: rgba(var(--cp-secondary-rgb), 0.42);
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(var(--cp-secondary-rgb), 0.18),
      transparent 34%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(var(--cp-primary-rgb), 0.14),
      transparent 38%
    ),
    var(--cp-neutral-surface-strong);
}

.bookshelf-soundtrack-copy h2 {
  max-width: 760px;
  margin: 10px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.bookshelf-soundtrack-description {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.bookshelf-soundtrack-continuity {
  max-width: 760px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(var(--cp-primary-rgb), 0.28);
  border-radius: 14px;
  background: rgba(var(--cp-primary-rgb), 0.06);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.bookshelf-soundtrack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.bookshelf-soundtrack-provider-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bookshelf-soundtrack-provider-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cp-neutral-surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.bookshelf-soundtrack-provider-link:hover,
.bookshelf-soundtrack-provider-link:focus-visible {
  border-color: rgba(var(--cp-primary-rgb), 0.5);
  color: var(--cyan);
}

.bookshelf-soundtrack-player-shell {
  position: relative;
  min-height: 352px;
  overflow: hidden;
  border: 1px solid rgba(var(--cp-primary-rgb), 0.42);
  border-radius: 22px;
  background: var(--cp-neutral-surface-soft);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.28),
    0 0 30px rgba(var(--cp-primary-rgb), 0.12);
}

.bookshelf-soundtrack-player {
  position: relative;
  min-height: 352px;
}

.bookshelf-soundtrack-player iframe {
  display: block;
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 21px;
  background: transparent;
}

.bookshelf-soundtrack-player-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 22px,
      rgba(var(--cp-primary-rgb), 0.05) 22px 23px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 22px,
      rgba(var(--cp-secondary-rgb), 0.04) 22px 23px
    ),
    var(--cp-neutral-surface-strong);
  text-align: center;
}

.bookshelf-soundtrack-player-loading img {
  width: 76px;
  height: auto;
  filter: drop-shadow(
    0 0 18px rgba(var(--cp-primary-rgb), 0.35)
  );
}

.bookshelf-soundtrack-player-loading strong {
  color: var(--ink);
  font-size: 17px;
}

.bookshelf-soundtrack-player-loading span {
  max-width: 290px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bookshelf-soundtrack-player-unavailable {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 352px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.bookshelf-soundtrack-player-unavailable strong {
  color: var(--ink);
  font-size: 20px;
}

.bookshelf-soundtrack-player-unavailable span {
  max-width: 300px;
  color: var(--muted);
  line-height: 1.55;
}

@media(max-width:900px) {
  .bookshelf-soundtrack {
    grid-template-columns: 1fr;
  }

  .bookshelf-soundtrack-player-shell {
    width: min(100%, 520px);
  }
}

@media(max-width:560px) {
  .bookshelf-soundtrack {
    padding: 22px 17px;
  }

  .bookshelf-soundtrack-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bookshelf-soundtrack-actions .btn {
    justify-content: center;
  }

  .bookshelf-soundtrack-player-shell,
  .bookshelf-soundtrack-player,
  .bookshelf-soundtrack-player iframe,
  .bookshelf-soundtrack-player-unavailable {
    min-height: 352px;
  }
}
