[hidden] {
  display: none !important;
}

.public-story-main {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 64px;
}

.story-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 66px);
  text-align: center;
}

.story-breadcrumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.story-breadcrumbs a {
  color: var(--cyan);
  text-decoration: none;
}

.story-breadcrumbs a:hover,
.story-breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.story-hero h1 {
  max-width: 900px;
  margin: 12px auto 18px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.story-summary {
  max-width: 790px;
  margin: 0 auto;
  color: #d9f6ff;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.65;
}

.story-byline {
  display: flex;
  justify-content: center;
  gap: 9px 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.story-byline > * {
  padding: 7px 10px;
  border: 1px solid rgba(94, 230, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 10, 24, 0.36);
}

.story-byline a {
  color: var(--cyan);
  text-decoration: none;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(270px, 0.72fr);
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

.story-reading-column,
.story-sidebar {
  display: grid;
  gap: 22px;
}

.story-body {
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(
      180deg,
      rgba(8, 15, 34, 0.97),
      rgba(4, 9, 22, 0.98)
    );
}

.story-body p {
  max-width: 710px;
  margin: 0 auto 1.35em;
  color: #f0f7ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.88;
}

.story-body p:last-child {
  margin-bottom: 0;
}

.story-body p:first-child::first-letter {
  float: left;
  margin: 0.07em 0.1em 0 0;
  color: var(--cyan);
  font-family: Inter, sans-serif;
  font-size: 3.7em;
  font-weight: 900;
  line-height: 0.82;
  text-shadow: 0 0 22px rgba(94, 230, 255, 0.32);
}

.story-body .story-system-message {
  padding: 15px 18px;
  border: 1px solid rgba(114, 255, 157, 0.26);
  border-radius: 12px;
  background: rgba(114, 255, 157, 0.06);
  color: var(--green);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(12px, 1.6vw, 15px);
  line-height: 1.7;
  text-align: center;
}

.story-body .story-system-message::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font: inherit;
  text-shadow: none;
}

.story-info-panel {
  padding: 22px;
}

.story-info-panel h2 {
  margin: 8px 0 12px;
  font-size: 25px;
  line-height: 1.05;
}

.story-info-panel > p,
.story-city-list p {
  color: var(--muted);
  line-height: 1.6;
}

.story-city-list {
  display: grid;
  gap: 13px;
}

.story-city-list article {
  padding: 14px;
  border: 1px solid rgba(94, 230, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 10, 24, 0.34);
}

.story-city-list strong {
  color: var(--cyan);
}

.story-city-list p {
  margin: 7px 0 0;
}

.series-story-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.series-story-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(94, 230, 255, 0.14);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.series-story-list a:hover,
.series-story-list a:focus-visible,
.series-story-list li[aria-current="page"] a {
  border-color: rgba(94, 230, 255, 0.4);
  background: rgba(94, 230, 255, 0.08);
}

.series-story-list span {
  color: #d46bff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.connected-book {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px;
}

.connected-book-cover img,
.story-book-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(94, 230, 255, 0.24);
  border-radius: 16px;
  object-fit: cover;
}

.story-book-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      145deg,
      rgba(16, 31, 73, 0.95),
      rgba(5, 10, 24, 0.95)
    );
  color: var(--cyan);
  font-family: "Press Start 2P", monospace;
}

.connected-book-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
}

.connected-book-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.connected-book-copy small,
.story-book-unavailable {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.story-book-unavailable {
  padding: 12px;
  border: 1px solid rgba(94, 230, 255, 0.14);
  border-radius: 12px;
  background: rgba(5, 10, 24, 0.34);
}

.story-error {
  max-width: 880px;
  margin: 70px auto;
  padding: clamp(32px, 7vw, 72px);
  text-align: center;
}

.story-error h1 {
  margin: 10px 0 14px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.96;
}

.story-error p {
  max-width: 700px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 19px;
}

@media (max-width: 930px) {
  .story-layout {
    grid-template-columns: 1fr;
  }

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

  .story-sidebar > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .public-story-main {
    width: min(100% - 20px, 1180px);
    margin-top: 22px;
  }

  .story-hero,
  .story-body {
    padding: 24px 19px;
  }

  .story-sidebar {
    grid-template-columns: 1fr;
  }

  .story-sidebar > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .connected-book {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 15px;
  }

  .connected-book-copy h2 {
    font-size: 27px;
  }

  .story-body p {
    font-size: 19px;
    line-height: 1.78;
  }
}

@media (max-width: 470px) {
  .connected-book {
    grid-template-columns: 1fr;
  }

  .connected-book-cover {
    width: min(180px, 60%);
  }
}


.story-appreciation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  padding: 22px;
  border-color: rgba(255, 93, 218, 0.28);
  background:
    linear-gradient(
      145deg,
      rgba(255, 93, 218, 0.07),
      rgba(94, 230, 255, 0.05)
    );
}

.story-appreciation-panel h2 {
  margin: 8px 0 7px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.02;
}

.story-appreciation-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-appreciation-action {
  display: grid;
  gap: 9px;
  min-width: 210px;
  text-align: center;
}

.story-appreciation-action > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

#story-appreciation-button.is-appreciated {
  border-color: rgba(114, 255, 157, 0.52);
  background:
    linear-gradient(
      135deg,
      rgba(114, 255, 157, 0.95),
      rgba(94, 230, 255, 0.92)
    );
  color: #04101c;
}

.story-appreciation-message {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(94, 230, 255, 0.07);
  color: var(--muted);
}

.story-appreciation-message.success {
  border: 1px solid rgba(114, 255, 157, 0.34);
  color: var(--green);
}

.story-appreciation-message.error {
  border: 1px solid rgba(255, 95, 109, 0.38);
  background: rgba(255, 95, 109, 0.07);
  color: #ff9ca5;
}

@media (max-width: 680px) {
  .story-appreciation-panel {
    grid-template-columns: 1fr;
  }

  .story-appreciation-action {
    min-width: 0;
  }
}


.story-pin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  padding: 22px;
  border-color: rgba(212, 107, 255, 0.3);
  background:
    linear-gradient(
      145deg,
      rgba(212, 107, 255, 0.07),
      rgba(94, 230, 255, 0.04)
    );
}

.story-pin-panel h2 {
  margin: 8px 0 7px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.02;
}

.story-pin-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-pin-action {
  min-width: 210px;
  text-align: center;
}

#story-pin-button.is-pinned {
  border-color: rgba(212, 107, 255, 0.56);
  background:
    linear-gradient(
      135deg,
      rgba(212, 107, 255, 0.98),
      rgba(255, 93, 218, 0.88)
    );
  color: #07101e;
}

.story-pin-message {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(212, 107, 255, 0.07);
  color: var(--muted);
}

.story-pin-message.success {
  border: 1px solid rgba(212, 107, 255, 0.38);
  color: #d46bff;
}

.story-pin-message.error {
  border: 1px solid rgba(255, 95, 109, 0.38);
  background: rgba(255, 95, 109, 0.07);
  color: #ff9ca5;
}

@media (max-width: 680px) {
  .story-pin-panel {
    grid-template-columns: 1fr;
  }

  .story-pin-action {
    min-width: 0;
  }
}


.story-trail-title-link {
  color: var(--ink);
  text-decoration: none;
}

.story-trail-title-link:hover,
.story-trail-title-link:focus-visible {
  color: var(--cyan);
}

.story-trail-page-link {
  width: fit-content;
  margin-top: 16px;
}

@media (max-width: 620px) {
  .story-trail-page-link {
    width: 100%;
    text-align: center;
  }
}


.story-trail-reader-navigation {
  display: grid;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: stretch;
  align-items: stretch;
  gap: 18px;
  padding: clamp(20px, 4vw, 30px);
  border-color: rgba(255, 93, 218, 0.28);
  background:
    radial-gradient(
      circle at 88% 16%,
      rgba(255, 93, 218, 0.1),
      transparent 40%
    ),
    rgba(5, 10, 24, 0.7);
  text-align: left;
}

.story-trail-reader-heading {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.story-trail-reader-heading > div {
  min-width: 0;
}

.story-trail-reader-heading h2 {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: clamp(25px, 3.2vw, 37px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.story-trail-progress-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 93, 218, 0.34);
  border-radius: 999px;
  background: rgba(255, 93, 218, 0.08);
  color: #ff8ee5;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.story-trail-reader-actions {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.story-trail-reader-actions > .btn {
  display: grid;
  min-width: 0;
  place-content: center;
  min-height: 58px;
  text-align: center;
  white-space: normal;
}

.story-trail-reader-actions > .btn:not(
  .story-trail-reader-direction
) {
  grid-column: 1 / -1;
  grid-row: 2;
}

.story-trail-reader-direction {
  gap: 4px;
}

.story-trail-reader-direction span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.story-trail-reader-direction strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.story-trail-reader-end {
  display: grid;
  min-width: 0;
  place-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px dashed rgba(94, 230, 255, 0.18);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .story-trail-reader-heading {
    display: grid;
  }

  .story-trail-progress-badge {
    width: fit-content;
  }

  .story-trail-reader-actions {
    grid-template-columns: 1fr;
  }

  .story-trail-reader-actions > .btn:not(
    .story-trail-reader-direction
  ) {
    grid-column: auto;
    grid-row: auto;
  }
}


/* === Step 137B: targeted public story reader upgrade ===
   The existing reader remains intact. This adds city-bookshelf return
   paths, sharing, and the unified electric-violet accent. */

.public-story-main .kicker{
  color:#d46bff!important;
}

.story-reader-utility-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:22px;
}

.story-reader-utility-actions .btn{
  min-height:42px;
}

.story-city-bookshelf-link{
  display:inline-flex;
  width:fit-content;
  margin-top:13px;
  color:#d46bff;
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

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

.story-bookshelf-return{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding:clamp(22px,4vw,32px);
  border-color:rgba(212,107,255,.34);
  background:
    radial-gradient(
      circle at 88% 18%,
      rgba(212,107,255,.14),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(212,107,255,.07),
      rgba(41,231,255,.045)
    );
}

.story-bookshelf-return h2{
  margin:8px 0 8px;
  font-size:clamp(26px,4vw,39px);
  line-height:1.02;
}

.story-bookshelf-return p{
  max-width:680px;
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.story-bookshelf-return-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}

.story-bookshelf-return-actions .btn{
  min-height:44px;
}

.story-share-status{
  width:100%;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-align:center;
}

@media(max-width:760px){
  .story-bookshelf-return{
    grid-template-columns:1fr;
  }

  .story-bookshelf-return-actions{
    justify-content:flex-start;
  }

  .story-bookshelf-return-actions .btn{
    width:100%;
    text-align:center;
  }
}


/* === Step 137B1: prevent return-panel button overlap ===
   Keep the explanatory copy full-width and place the navigation buttons
   beneath it. This avoids the action column compressing the heading and
   paragraph at medium desktop widths. */
.story-bookshelf-return{
  grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;
}

.story-bookshelf-return-actions{
  width:100%!important;
  justify-content:flex-start!important;
}

.story-bookshelf-return-actions .btn{
  flex:0 1 auto!important;
}

@media(max-width:620px){
  .story-bookshelf-return-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  .story-bookshelf-return-actions .btn{
    width:100%!important;
    text-align:center!important;
  }
}


/* === Step 139: dynamic links for every connected city === */
.story-city-dynamic-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:13px;
}

.story-city-dynamic-links .story-city-bookshelf-link,
.story-city-dynamic-links .story-city-map-link{
  display:inline-flex;
  width:fit-content;
  margin:0;
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.story-city-dynamic-links .story-city-bookshelf-link{
  color:#d46bff;
}

.story-city-dynamic-links .story-city-map-link{
  color:var(--cyan);
}

.story-city-dynamic-links a:hover,
.story-city-dynamic-links a:focus-visible{
  color:#ffffff;
  text-decoration:underline;
}


/* === Step 149: Pixel Props and All the Props === */
.story-props-buttons{
  display:grid;
  gap:8px;
}

.story-props-counts{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:13px;
  font-weight:900;
}

.story-all-props-button{
  border-color:rgba(255,93,218,.55);
  background:
    linear-gradient(
      135deg,
      rgba(107,44,151,.92),
      rgba(255,93,218,.88)
    );
  color:#fff;
}

.story-all-props-button.is-all-props{
  border-color:rgba(255,222,102,.72);
  background:
    linear-gradient(
      135deg,
      rgba(255,222,102,.98),
      rgba(255,116,82,.94)
    );
  color:#1b0a07;
}

.story-remove-props-button{
  justify-self:center;
  border-color:transparent;
  background:transparent;
  color:var(--muted);
}

.story-remove-props-button:hover,
.story-remove-props-button:focus-visible{
  color:#fff;
}

.story-superfan-panel{
  display:grid;
  gap:16px;
  padding:22px;
  border-color:rgba(255,222,102,.42);
  background:
    radial-gradient(
      circle at top right,
      rgba(255,222,102,.15),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      rgba(84,24,101,.88),
      rgba(20,16,54,.94)
    );
}

.story-superfan-panel[hidden]{
  display:none!important;
}

.story-superfan-celebration h2{
  margin:8px 0 7px;
  font-size:clamp(27px,4vw,42px);
}

.story-superfan-celebration p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.story-superfan-follow{
  margin-top:0;
}

.story-superfan-follow .reader-follow-count{
  display:none;
}


/* === Step 150B: Reader transparency for private author Props === */
.story-props-privacy-note{
  margin-top:10px!important;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.1);
  color:rgba(219,225,243,.72)!important;
  font-size:12px;
  line-height:1.5!important;
}
