/* Dewdrop: chapter reading page. Reader typography is left alone. Colors come from the Dewdrop tokens. */

body.dd-chapter-page .chapter__title { position: relative; padding-bottom: .9rem; font-family: var(--ff-heading, inherit); font-weight: 700; color: var(--dda-ink); }
body.dd-chapter-page .chapter__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: min(140px, 50%); height: 10px;
  background: var(--dd-wave) center / 100% 100% no-repeat; pointer-events: none;
}

/* story link above the title -> pill */
body.dd-chapter-page [class*="chapter__story-link"] {
  display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .75rem .12rem .55rem; margin-bottom: .35rem;
  border: 2px solid var(--dda-soft); border-radius: 99px; background: var(--dda-sky);
  color: var(--dda-ink); font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s;
}
body.dd-chapter-page [class*="chapter__story-link"]::before { content: ""; width: .8em; height: 1em; background: var(--dd-drop-svg) center / contain no-repeat; }
body.dd-chapter-page [class*="chapter__story-link"]:hover { border-color: var(--dda-dew); }

/* comments */
body.dd-chapter-page #comment { border: 2px solid var(--dda-soft); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
body.dd-chapter-page #comment:focus { border-color: var(--dda-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dda-accent) 22%, transparent); outline: none; }
body.dd-chapter-page [class*="fictioneer-comment__container"] { border-radius: 16px 16px 16px 5px; }

/* recommended carousel under the chapter footer */
body.dd-chapter-page .dd-chapter-rec { margin: 2.5rem 0 1.5rem; }
body.dd-chapter-page .dd-chapter-rec .dd-sec { margin-bottom: 0; }

/* empty share/RSS wrapper (buttons removed) */
.media-buttons:empty { display: none; }

.dd-story-rec { margin: 2.5rem 0 1rem; }
.dd-story-rec .dd-sec { margin-bottom: 0; }

/* ---- story page tabs ---- */
.dd-off { display: none !important; }
.dd-stabs { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1.6rem 0 1.2rem; border-bottom: 2px solid var(--dda-soft); }
.dd-stabs[hidden] { display: none; }
.dd-stabs__tab { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .1rem .55rem; margin-bottom: -2px; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer;
  font-family: var(--ff-heading, inherit); font-weight: 700; font-size: clamp(.82rem, 2.5vw, .98rem); color: var(--dda-ink); transition: color .15s, border-color .15s; }
.dd-stabs__tab:hover { color: var(--dda-accent); }
.dd-stabs__tab.is-on { color: var(--dda-accent); border-bottom-color: var(--dda-accent); }
.dd-stabs__n { font-size: .74em; font-weight: 700; line-height: 1; padding: .22em .6em; border-radius: 99px; background: var(--dda-soft); color: var(--dda-ink); }
/* Fictioneer's single "N Chapters" pill is redundant now; keep the tab bar only when it holds extra tabs (blog / custom pages) */
body.dd-story-page .story__tabs .tabs:has(> .tabs__item:only-child) { display: none; }
body.dd-story-page .story__tabs { justify-content: flex-end; }
body.dd-story-page .comment-section { margin-top: 0; }

/* ---- story page: layout like the reference, in Dewdrop colors ---- */
body.dd-story-page .dd-stabs { margin: 2.2rem 0 1rem; }
body.dd-story-page .story__after-summary { margin-top: .6rem; gap: .5rem 1rem; flex-wrap: wrap; }
body.dd-story-page .story__actions { flex-wrap: wrap; align-items: center; gap: .5rem; }
body.dd-story-page .story__tabs { margin: 1.2rem 0 1rem; }
body.dd-story-page .story__summary { margin-top: 0; }
body.dd-story-page .comment-section { padding-top: .5rem; }
body.dd-story-page .fictioneer-comments__title { font-family: var(--ff-heading, inherit); color: var(--dda-ink); border-bottom: 2px dashed var(--dda-soft); padding-bottom: .6rem; margin-bottom: 1rem; }
body.dd-story-page .story__meta .story__views { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .8rem; border-radius: 99px; background: var(--dda-sky); border: 2px solid var(--dda-soft); color: var(--dda-ink); font-weight: 600; }

/* no Subscribe button on the Chapters tab */
.story__article[data-dd-tab="chapters"] .story__actions .subscribe-menu-toggle { display: none; }

/* smaller carousel cards on laptops/desktops (story + chapter pages); phones keep their own sizes */
@media (min-width: 701px) {
  .dd-story-rec .dd-pick, .dd-chapter-rec .dd-pick { flex-basis: 118px; gap: .4rem; }
  .dd-story-rec .dd-pick__art, .dd-chapter-rec .dd-pick__art { border-width: 2px; border-radius: 12px 12px 12px 28px; box-shadow: 3px 4px 0 var(--da-dew); }
  .dd-story-rec .dd-pick__clover, .dd-chapter-rec .dd-pick__clover { width: 22px; height: 22px; top: 5px; left: 5px; }
  .dd-story-rec .dd-pick__title, .dd-chapter-rec .dd-pick__title { font-size: .8rem; }
  .dd-story-rec .dd-pick__meta, .dd-chapter-rec .dd-pick__meta { font-size: .66rem; }
  .dd-story-rec .dd-car__track, .dd-chapter-rec .dd-car__track { gap: .8rem; }
  .dd-story-rec .dd-sec__title, .dd-chapter-rec .dd-sec__title { font-size: 1.3rem; }
  .dd-story-rec .dd-car__btn, .dd-chapter-rec .dd-car__btn { width: 38px; height: 38px; font-size: 1.4rem; }
}

/* ---- no paragraph indent on any chapter (v1.16.4) ----
   Beats Fictioneer's default rule and any saved reader preference; the indent toggle in the formatting modal is hidden because it would do nothing. */
body.dd-chapter-page .chapter__content p,
body.dd-chapter-page .chapter__content .chapter-formatting p,
body.dd-chapter-page .chapter__content .chapter-formatting.no-indent p { text-indent: 0 !important; }
.reader-settings__toggle:has(#reader-settings-indent-toggle) { display: none !important; }
