/* Published work: the shelf jacket becomes a restrained bookplate header. */
.published-work-page .published-intro-card { position: relative; padding: 0; overflow: hidden; background: #202723; }
.published-work-page .published-banner { position: relative; z-index: 1; min-height: 215px; isolation: isolate; }
.published-work-page .published-work-jacket:not([hidden])::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(12,17,17,.34), rgba(12,17,17,.12) 42%, transparent 78%), linear-gradient(0deg, rgba(12,17,17,.14), transparent 65%); }
.published-work-page .published-work-jacket:not([hidden]) { float: none; display: block; position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; margin: 0; }
.published-work-page .published-work-jacket .gm-work-jacket-media { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.published-work-page .published-work-jacket .gm-work-jacket-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--gm-banner-x, 50%) var(--gm-banner-y, 50%); }
.published-work-page .published-work-jacket > .gm-custom-banner-image { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.published-work-page .published-work-jacket .gm-work-jacket-copy { display: none; }
.published-work-page .published-work-jacket .gm-work-jacket-media::after { display: none; }
.published-work-page .published-banner-copy { box-sizing: border-box; position: relative; z-index: 2; min-height: 215px; display: flex; flex-direction: column; justify-content: end; align-items: start; padding: 27px 30px 6px; max-width: 74%; }
.published-work-page .published-banner h1 { color: #fff !important; text-shadow: 0 2px 8px rgba(0,0,0,.7); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; margin: 0 0 13px; overflow-wrap: anywhere; }
.published-work-page .published-work-author { display: flex; align-items: center; gap: 9px; margin: 0; color: #f2eee6 !important; text-shadow: 0 1px 4px #000; }
.published-work-page .published-work-author img { display: block; width: 32px; height: 32px; flex: none; object-fit: cover; border-radius: 50%; border: 1px solid #c7aa7a; }
.published-work-page .published-work-author a { color: #e9c88f !important; }
html body main.published-work-page #published-work-author-link,
html body main.published-work-page #published-work-author-link:visited { color: #e9c88f !important; -webkit-text-fill-color: #e9c88f !important; }
.published-work-page .published-view-jacket { flex: none; display: inline-flex; align-items: center; width: auto; min-height: 36px; margin: 0 0 0 auto; padding: 0 2px; background: none; border: 0; border-radius: 0; color: #f4eee3; opacity: .78; font: 500 .78rem/1.2 Georgia, serif; text-decoration: none; text-shadow: 0 1px 4px #000; cursor: pointer; }
.published-work-page .published-view-jacket[hidden] { display: none !important; }
.published-work-page .published-view-jacket:hover, .published-work-page .published-view-jacket:focus-visible { opacity: 1; }
html body main.published-work-page a#view-full-jacket,
html body main.published-work-page a#view-full-jacket:visited,
html body main.published-work-page a#view-full-jacket:hover { background: none !important; background-color: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; text-decoration: none !important; color: #f4eee3 !important; -webkit-text-fill-color: #f4eee3 !important; }
html body main.published-work-page a#view-full-jacket:focus-visible { outline: 2px solid #f4eee3 !important; outline-offset: 3px !important; }
.published-work-page .published-work-badges { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 18px; }
.published-work-page .published-work-badges-list { flex: 1 1 200px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.published-work-page .published-work-badges .work-badge { padding: 5px 11px; font-size: .8rem; font-weight: 500; border-radius: 999px; }
.published-work-page .published-work-badges .work-type-badge { opacity: 1 !important; background: #35434a !important; color: #f6f1e9 !important; border-color: #87979b !important; }
body.skin-night-bloom .published-work-page .published-work-badges .work-type-badge { background: #60485a !important; border-color: #aa879e !important; }
body.skin-dark-academia .published-work-page .published-work-badges .work-type-badge { background: #514032 !important; border-color: #9c8268 !important; }
.published-work-page .published-series-card { margin: 0 0 12px; padding: 17px 23px; background: var(--gm-card, var(--card-bg, #fffdf8)); color: var(--gm-card-text, var(--card-text, inherit)); border: 1px solid var(--gm-border, rgba(100,100,100,.35)); }
.published-work-page .published-series-card[hidden] { display: none; }
.published-work-page .published-series-kicker { margin: 0 0 4px; color: var(--gm-link-color, #765634); font: 650 .75rem/1.3 var(--font-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.published-work-page .published-series-card h2 { margin: 0 0 3px; color: inherit; font: 500 1.4rem/1.25 Georgia, serif; }
.published-work-page .published-series-place { margin: 0 0 13px; font-size: .88rem; opacity: .82; }
.published-work-page .published-series-works { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.published-work-page .published-series-works li { display: flex; align-items: baseline; gap: 11px; padding: 7px 0; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.published-work-page .published-series-works li > span { flex: 0 0 57px; font: 650 .76rem/1.3 var(--font-ui, sans-serif); opacity: .72; }
.published-work-page .published-series-works li > :is(a,strong) { min-width: 0; overflow-wrap: anywhere; }
.published-work-page .published-series-works li[aria-current="page"] { color: var(--gm-link-color, #765634); }
.published-work-page .published-series-works li.is-draft small { margin-left: auto; color: inherit; font: 600 .72rem/1.3 var(--font-ui, sans-serif); opacity: .78; }
.published-work-page .published-series-card a { color: var(--gm-link-color, var(--gm-accent, #765634)); }
.published-work-page .published-series-navigation { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: .86rem; }
.dashboard-series-label { display: block; margin-top: 3px; font: 500 .82rem/1.35 var(--font-ui, sans-serif); opacity: .78; }
body.skin-after-hours .published-work-page .published-work-badges { background: rgba(29,41,45,.91); border-top: 1px solid #415154; border-bottom: 1px solid #415154; }
body.skin-after-hours .published-work-page .published-work-badges .rating-badge { background: #6b4d3e !important; border-color: #a7805d !important; color: #fff0dc !important; }
body.skin-after-hours .published-work-page .published-work-badges .work-type-badge { background: #30434a !important; border-color: #71868a !important; color: #edf0ed !important; }
body.skin-after-hours .published-work-page .published-work-badges .relationship-badge { background: #405849 !important; border-color: #78917a !important; color: #f2f1e6 !important; }
.published-work-page .published-details-card { padding: 20px 24px; }
.published-work-page .published-details-card > .published-priority-row,
.published-work-page .published-details-card > .published-tags-row { margin: 0 0 12px; }
.published-work-page .published-details-card > .published-priority-row > strong,
.published-work-page .published-details-card > .published-tags-row > strong { display: block; margin: 0 0 5px; font-family: Georgia, serif; font-size: 1rem; font-weight: 500; }
.published-work-page .published-details-card .tag-pill-group { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.published-work-page .published-details-card .tag-pill-group :is(a,button,.tag-pill),
.published-work-page .published-details-card .published-tag-list :is(a,button,.tag-pill) { font-size: .72rem !important; line-height: 1.2 !important; padding: 3px 8px !important; border-radius: 999px !important; }
.published-work-page .published-details-card #published-work-relationships :is(a,button,.tag-pill) { color: #c7aa7a !important; border-color: #8d795d !important; }
body.skin-after-hours .published-work-page .published-details-card #published-work-relationships a.metadata-link.tag-pill { color: #c7aa7a !important; background: rgba(199,170,122,.1) !important; border-color: #8d795d !important; }
body.skin-after-hours .published-work-page .published-details-card > .published-relationships-row > strong { color: #c7aa7a !important; }
body.skin-after-hours .published-work-page .published-summary-block { border-top-color: rgba(199,170,122,.52); }
body.skin-after-hours .published-work-page .published-section-label { color: #c7aa7a; opacity: 1; }
body.skin-after-hours .published-work-page .start-reading-button { background: #405849 !important; border-color: #78917a !important; color: #f3eee3 !important; }
body.skin-after-hours .published-work-page .published-social-actions :is(#bookmark-work-button,#read-later-button) { border-color: #8d795d !important; color: #e4c698 !important; background: rgba(199,170,122,.09) !important; }
body.skin-after-hours .published-work-page .published-social-actions #subscribe-work-button:not([hidden]) { border-color: #78917a !important; color: #dce8d8 !important; background: rgba(64,88,73,.35) !important; }
.published-work-page .published-summary-block { margin: 16px 0 18px; padding: 17px 0 0; }
.published-work-page #published-work-summary { color: inherit !important; opacity: 1 !important; }
.published-work-page #published-work-warning-row { margin: 0 0 12px; padding: 0; border-top: 0; }
.published-work-page #published-work-warning-row > strong { font-family: inherit; font-size: .85rem; }
.published-jacket-dialog { max-width: min(90vw, 600px); max-height: 90vh; padding: 14px; border: 1px solid #c7aa7a; background: #171a19; color: white; }
.published-jacket-dialog::backdrop { background: rgba(0,0,0,.8); }
.published-jacket-dialog img { display: block; max-width: 100%; max-height: calc(90vh - 55px); object-fit: contain; }
.published-jacket-dialog button { display: block; width: auto; margin: 0 0 8px auto; padding: 1px 9px; background: transparent; border: 1px solid #a6a394; color: white; font-size: 1.3rem; }
@media (max-width: 760px) {
  .published-work-page .published-work-jacket > .gm-custom-banner-image.is-default-banner { object-position: 60% center; }
  .published-jacket-dialog { box-sizing: border-box; width: min(80vw, 320px); max-width: 320px; max-height: 78vh; padding: 11px; }
  .published-jacket-dialog img { max-height: calc(78vh - 64px); margin: 0 auto; }
  .published-work-page .published-banner,.published-work-page .published-banner-copy { min-height: 205px; }
  .published-work-page .published-banner-copy { max-width: 100%; padding: 22px 16px 8px; }
  .published-work-page .published-banner h1 { font-size: clamp(1.65rem, 7vw, 2.4rem); }
  .published-work-page .published-work-badges { gap: 8px; padding: 8px 14px; }
  .published-work-page .published-details-card { padding: 16px; }
  .published-work-page .published-series-card { padding: 15px 16px; }
}
.gm-banner-crop-editor { grid-column: 1 / -1; min-width: 0; padding: 15px 0 0; border-top: 1px solid rgba(128,128,128,.3); }
.gm-banner-crop-editor[hidden] { display: none; }
.gm-banner-crop-editor > label { display: block; margin: 9px 0 5px; font-weight: 600; }
.gm-banner-crop-editor > span { display: block; margin: 7px 0; font-size: .85rem; }
.gm-banner-crop-editor input[type="range"] { display: block; width: min(100%, 420px); }
.gm-banner-crop-preview { position: relative; width: min(100%, 620px); height: 160px; overflow: hidden; background: #202723; }
.gm-banner-crop-preview::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(12,17,17,.34), rgba(12,17,17,.12) 42%, transparent 78%), linear-gradient(0deg, rgba(12,17,17,.14), transparent 65%); }
.gm-banner-crop-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gm-banner-upload-editor { grid-column: 1 / -1; min-width: 0; padding: 17px 0 0; border-top: 1px solid rgba(128,128,128,.3); }
.gm-banner-upload-editor > strong { display: block; font-family: Georgia, serif; font-size: 1.07rem; }
.gm-banner-upload-editor > p { margin: 7px 0; }
.gm-banner-upload-editor > small { display: block; opacity: .82; line-height: 1.5; }
.gm-banner-upload-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.gm-banner-upload-controls > button { width: auto; margin: 0; padding: 7px 11px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.gm-banner-upload-controls > button[hidden], .gm-banner-upload-previews[hidden] { display: none; }
.gm-banner-upload-controls > span { font-size: .85rem; }
.gm-banner-upload-previews { display: flex; flex-wrap: wrap; align-items: start; gap: 14px; }
.gm-banner-upload-preview { position: relative; isolation: isolate; width: min(100%, 620px); aspect-ratio: 4 / 1; min-height: 145px; overflow: hidden; background: #202723; color: white; }
.gm-banner-upload-preview.is-mobile { width: min(100%, 260px); aspect-ratio: 1.35 / 1; }
.gm-banner-upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gm-banner-upload-previews[data-source="default"] .gm-banner-upload-preview.is-mobile img { object-position: 60% center; }
.gm-banner-upload-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,17,17,.34), rgba(12,17,17,.12) 42%, transparent 78%), linear-gradient(0deg, rgba(12,17,17,.14), transparent 65%); }
.gm-banner-upload-preview span, .gm-banner-upload-preview strong { position: absolute; z-index: 1; left: 15px; text-shadow: 0 2px 5px #000; }
.gm-banner-upload-preview span { top: 12px; font: 12px sans-serif; }
.gm-banner-upload-preview strong { bottom: 13px; font: 600 clamp(17px, 2vw, 24px) Georgia, serif; }

/* The next reading action belongs immediately after the work banner. */
.published-work-page .published-intro-card + .published-reading-actions {
  margin: 12px 0 8px !important;
}
.published-work-page .published-reading-actions + .chapter-index-panel {
  margin: 0 0 12px !important;
}

/* Keep the two sets of actions at the foot of a work visually consistent. */
.published-work-page .published-social-actions button,
.published-work-page #owner-work-actions > :is(a, button) {
  box-sizing: border-box !important;
  min-height: 44px !important;
  padding: 10px 14px !important;
  border-radius: 9px !important;
  font-family: var(--font-ui, sans-serif) !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: center;
}
.published-work-page #owner-work-actions { gap: 8px; }

@media (max-width: 600px) {
  .published-work-page .published-social-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .published-work-page .published-social-actions button {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    white-space: normal !important;
  }
  .published-work-page .published-social-actions #report-work-button {
    grid-column: 2;
    margin-left: 0 !important;
  }
  /* The inline display style is set by script.js only for the work's author. */
  .published-work-page #owner-work-actions[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }
  .published-work-page #owner-work-actions > :is(a, button) {
    width: 100% !important;
    min-width: 0;
    white-space: normal;
  }
  .published-work-page #owner-work-actions > .owner-export-button {
    grid-column: 1 / -1;
  }
}
