/* v80.8.82 — Public book-page parity and linked-edition controls.
 * Loaded only on written/illustrated book landing pages; never on reader spreads.
 * Reuse the discovery linked-edition SVG and existing public-visibility checks. */

/* Graphic landing pages inherited an extra 2rem top margin that the written
 * landing page does not have. Preserve the shared content inset and all
 * bottom-margin/breadcrumb spacing while removing only the duplicate top gap. */
.site-main > .rw808-book-page { margin-top:0; }

/* Keep the H1 itself in its established desktop and phone CSS grid position.
 * The icon is a phrase within the H1, so long titles wrap naturally and all
 * v80.8.76–79 direct-child sizing rules remain effective. */
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon {
  position:relative;
  display:inline-flex;
  vertical-align:middle;
  align-items:center;
  justify-content:center;
  width:1.8rem;
  height:1.8rem;
  min-width:1.8rem;
  padding:0;
  margin:0 0 .08em .4em;
  border:1px solid var(--border,#353d49);
  border-radius:50%;
  background:var(--surface-alt,var(--surface,#1d222b));
  color:var(--accent,#c6a6e7);
  text-decoration:none;
  line-height:1;
  font-size:1rem;
  font-weight:400;
  white-space:nowrap;
  box-sizing:border-box;
}
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon svg {
  display:block;
  width:17px;
  height:17px;
  flex:none;
}
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon:hover,
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon:focus-visible {
  border-color:var(--accent,#c6a6e7);
  background:var(--raised,#252c37);
  outline-offset:2px;
}
/* One styled tooltip, not two competing native title + generated tooltips.
 * Use the original, accessible aria-label from rw807_edition_link_icon(). */
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon::after {
  content:attr(data-tooltip);
  visibility:hidden;
  opacity:0;
  position:absolute;
  z-index:50;
  right:0;
  bottom:calc(100% + .55rem);
  width:max-content;
  max-width:min(18rem,75vw);
  box-sizing:border-box;
  padding:.4rem .6rem;
  border:1px solid var(--border,#353d49);
  border-radius:6px;
  background:var(--surface,#1d222b);
  color:var(--text,#eef0f4);
  font-size:.76rem;
  font-weight:500;
  line-height:1.35;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  pointer-events:none;
  box-shadow:0 6px 20px #0005;
}
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon:hover::after,
.rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon:focus-visible::after {
  visibility:visible;
  opacity:1;
}
@media (max-width:540px) {
  .rw8076-mobile-book .rw8077-story-identity > h1 .rw807-linked-icon {
    width:1.65rem;
    height:1.65rem;
    min-width:1.65rem;
    margin-left:.28em;
  }
}
