/*
 * Zyrenicus Fictioneer cohesion pass.
 *
 * Purpose:
 * - bring inner Fictioneer views closer to the bespoke front-page brand language
 * - stay lightweight and CSS-led
 * - avoid front-page runtime dependencies and heavy template surgery
 *
 * Scope:
 * - story / chapter / collection titles
 * - archive and singular headings used by Fictioneer list templates
 * - taxonomy pills
 * - action/list buttons
 * - restrained story footer meta chip polish
 */

:root {
  --zy-cohesion-title: rgba(245, 238, 225, 0.96);
  --zy-cohesion-title-soft: rgba(231, 222, 208, 0.86);
  --zy-cohesion-gold: rgba(255, 214, 140, 0.82);
  --zy-cohesion-gold-border: rgba(255, 214, 140, 0.18);
  --zy-cohesion-gold-border-strong: rgba(255, 214, 140, 0.30);
  --zy-cohesion-glass-top: rgba(255, 255, 255, 0.08);
  --zy-cohesion-glass-bottom: rgba(255, 255, 255, 0.03);
  --zy-cohesion-surface: linear-gradient(180deg, rgba(44, 50, 60, 0.96), rgba(20, 24, 32, 0.96));
  --zy-cohesion-surface-hover: linear-gradient(180deg, rgba(56, 64, 77, 0.98), rgba(26, 31, 41, 0.98));
  --zy-cohesion-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --zy-cohesion-pill-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 18px rgba(0, 0, 0, 0.14);
}

:where(.main.story, .main.chapter, .main.collection, .main.singular, .main.archive) {
  --ff-story-title: "Cinzel", var(--ff-base);
  --ff-chapter-title: "Cinzel", var(--ff-base);
  --ff-card-title: "Cinzel", var(--ff-base);
}

:where(
  .story__identity-title,
  .chapter__title,
  .collection__title,
  .archive__heading,
  .singular__title,
  .card__title
) {
  font-family: "Cinzel", var(--ff-heading);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--zy-cohesion-title);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.story__identity-title,
.chapter__title,
.collection__title,
.singular__title {
  text-wrap: balance;
}

.story__identity-title,
.chapter__title,
.collection__title {
  color: rgba(248, 241, 226, 0.98);
  text-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 10px 28px rgba(0,0,0,0.28), 0 0 18px rgba(255,214,140,0.08);
}

.archive__heading {
  letter-spacing: 0.075em;
}

.card__title {
  line-height: 1.2;
}

.card__title a,
.story__identity-meta a,
.chapter__story-link,
.chapter__author a {
  transition: color var(--transition-duration), opacity var(--transition-duration);
}

.story__identity-meta,
.chapter__author,
.chapter__story-link,
.archive__description {
  color: var(--zy-cohesion-title-soft);
}

.story__identity-meta,
.chapter__author {
  letter-spacing: 0.025em;
}

.story__identity-meta a:hover,
.chapter__story-link:hover,
.chapter__author a:hover,
.card__title a:hover {
  color: #fff7e7;
}

:where(.story__taxonomies, .collection__taxonomies, .card__tag-list) {
  gap: 8px;
}

:where(.story__taxonomies, .collection__taxonomies) .tag-group {
  gap: 8px;
}

:where(.story__taxonomies, .collection__taxonomies, .card__tag-list) .tag-pill {
  --tag-background: linear-gradient(180deg, var(--zy-cohesion-glass-top), var(--zy-cohesion-glass-bottom));
  --tag-background-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  --tag-color: rgba(245, 238, 225, 0.92);
  --tag-color-hover: #fff7e7;
  --tag-secondary-background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  --tag-secondary-background-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  --tag-secondary-color: rgba(241, 233, 220, 0.90);
  --tag-secondary-color-hover: #fff7e7;
  --tag-secondary-border: 1px solid var(--zy-cohesion-gold-border);
  --tag-secondary-border-hover: 1px solid var(--zy-cohesion-gold-border-strong);
  --tag-inline-color: rgba(233, 223, 208, 0.86);
  --tag-inline-color-hover: #fff4df;
  border-radius: 999px;
  box-shadow: var(--zy-cohesion-pill-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:where(.story__taxonomies, .collection__taxonomies, .card__tag-list) .tag-pill._secondary._taxonomy-content_warning {
  border-color: rgba(242, 102, 102, 0.32);
}

.story__actions > .button,
.story__actions > .button._secondary,
.chapter__actions .button,
.chapter__actions .button._secondary,
.list-button {
  --button-secondary-background: var(--zy-cohesion-surface);
  --button-secondary-background-hover: var(--zy-cohesion-surface-hover);
  --button-secondary-color: rgba(245, 238, 225, 0.94);
  --button-secondary-color-hover: #fff7e7;
  --button-secondary-border: 1px solid var(--zy-cohesion-gold-border);
  --button-secondary-border-hover: 1px solid var(--zy-cohesion-gold-border-strong);
  background: var(--zy-cohesion-surface);
  color: rgba(245, 238, 225, 0.94);
  border: 1px solid var(--zy-cohesion-gold-border);
  box-shadow: var(--zy-cohesion-shadow);
  font-family: "Lato", var(--ff-base);
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.story__actions > .button,
.story__actions > .button._secondary {
  border-radius: 999px;
  padding-inline: 0.9rem;
}

.story__actions > .button:not(.current, [disabled]):hover,
.story__actions > .button._secondary:not(.current, [disabled]):hover,
.chapter__actions .button:not(.current, [disabled]):hover,
.chapter__actions .button._secondary:not(.current, [disabled]):hover,
.list-button:not(._on):hover {
  background: var(--zy-cohesion-surface-hover);
  color: #fff7e7;
  border-color: var(--zy-cohesion-gold-border-strong);
}

.list-button {
  border-radius: 999px;
  padding: 7px 11px 6px;
  line-height: 1;
}

.list-button._text {
  letter-spacing: 0.06em;
}

.chapter__actions .button {
  min-height: 34px;
}

.chapter__actions > :not(.chapter__actions-center) > .button:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.chapter__actions > :not(.chapter__actions-center) > .button:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.story__meta {
  gap: 0.55rem;
}

.story__meta-item {
  align-items: center;
  gap: 0.4rem;
  min-height: 28px;
  padding: 0 0.65rem;
  line-height: 1.2;
  display: inline-flex;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 214, 140, 0.16);
  box-shadow: var(--zy-cohesion-pill-shadow);
}

.story__meta-item:not(:first-child) {
  margin-left: 0;
}

.story__meta-item:not(:first-child):not(.checkmark):before {
  content: none;
}

.story__meta-item.checkmark {
  padding: 0 0.55rem;
}

.story__meta > :is(span, label) :is(i, .icon) {
  color: rgba(255, 214, 140, 0.78);
}

.story__meta button.checkmark {
  margin-left: 0;
}

@media only screen and (max-width: 640px) {
  .story__meta {
    justify-content: flex-start;
    padding-right: 0;
    gap: 0.45rem;
  }

  .story__meta-item {
    min-height: 26px;
    padding: 0 0.55rem;
  }

  .archive__heading {
    letter-spacing: 0.05em;
  }
}


/* v1.33.2 stronger inner-page title/header graft.
 * Purpose:
 * - make story/chapter/collection/archive headers visibly match Zyrenicus brand language
 * - port the front-page gold/silver heading treatment onto inner-page identity blocks
 * - centre key reading-page titles without touching chapter body typography
 */

:where(.main.story, .main.chapter, .main.collection, .main.singular, .main.archive) {
  --zy-cohesion-gold-2: #f3dc8a;
  --zy-cohesion-gold-3: #8a7122;
  --zy-cohesion-silver: #d7dde6;
  --zy-cohesion-silver-2: #f7fbff;
  --zy-cohesion-silver-3: #8794a6;
  --zy-cohesion-gold-metallic: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--zy-cohesion-gold-2) 30%,
    var(--zy-cohesion-gold) 58%,
    var(--zy-cohesion-gold-3) 100%
  );
  --zy-cohesion-silver-metallic: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--zy-cohesion-silver-2) 30%,
    var(--zy-cohesion-silver) 58%,
    var(--zy-cohesion-silver-3) 100%
  );
  --zy-cohesion-title-shadow-strong: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.35), 0 -1px 0 rgba(255, 255, 255, 0.10);
}

.story__header .story__identity,
.chapter__headline,
.collection__header,
.archive__header,
.singular__header {
  text-align: center;
}

.story__header .story__identity,
.chapter__headline,
.collection__header,
.archive__header {
  align-items: center;
}

.story__header .story__identity {
  margin-inline: auto;
}

.chapter__headline {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.story__header .story__taxonomies,
.collection__taxonomies {
  justify-content: center;
}

.story__identity-title,
.chapter__title,
.collection__title,
.archive__heading,
.singular__title {
  font-family: "Cinzel", var(--ff-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--zy-cohesion-gold-metallic);
  background-image: var(--zy-cohesion-gold-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: var(--zy-cohesion-title-shadow-strong);
}

.story__identity-title {
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.1;
}

.chapter__title {
  margin-top: 0.3rem;
  font-size: clamp(1.8rem, 2.3vw, 2.45rem);
  line-height: 1.14;
}

.collection__title,
.singular__title {
  font-size: clamp(1.9rem, 2.5vw, 2.7rem);
  line-height: 1.12;
}

.archive__heading {
  margin-bottom: 0.95rem;
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem);
  line-height: 1.12;
  letter-spacing: 0.08em;
}

.story__identity-meta,
.chapter__headline > a,
.chapter__story-link,
.chapter__author,
.archive__description {
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

.story__identity-meta,
.chapter__headline > a,
.chapter__story-link,
.archive__description {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story__identity-meta,
.chapter__headline > a,
.chapter__story-link {
  font-size: clamp(0.78rem, 0.28vw + 0.72rem, 0.92rem);
  font-weight: 800;
}

.chapter__author {
  margin-top: 0.1rem;
  font-size: clamp(0.76rem, 0.22vw + 0.72rem, 0.88rem);
  letter-spacing: 0.04em;
}

.story__identity-meta,
.chapter__headline > a,
.chapter__story-link,
.chapter__author,
.archive__description {
  display: block;
}

.story__identity-meta a,
.chapter__headline > a,
.chapter__story-link,
.chapter__author a {
  color: inherit;
}

.story__identity-meta a,
.chapter__author a {
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: inherit;
}

.story__identity-meta a:hover,
.chapter__author a:hover {
  filter: brightness(1.08);
}

.story__identity-meta::after,
.chapter__story-link::after,
.chapter__headline > a::after {
  content: "";
  display: block;
  width: min(68px, 44%);
  height: 1px;
  margin: 0.34rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
  opacity: 0.8;
}

.archive__description {
  max-width: 64ch;
  margin-inline: auto;
  font-style: normal;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0.02em;
}

.collection__taxonomies {
  margin-bottom: 1.1rem;
}

@media only screen and (max-width: 640px) {
  .story__identity-title {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .chapter__title {
    font-size: clamp(1.55rem, 6.2vw, 2rem);
  }

  .collection__title,
  .singular__title {
    font-size: clamp(1.65rem, 6.6vw, 2.2rem);
  }

  .archive__heading {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    letter-spacing: 0.06em;
  }

  .story__identity-meta,
  .chapter__headline > a,
  .chapter__story-link,
  .chapter__author {
    letter-spacing: 0.09em;
  }
}


/* v1.33.3 chapter-page headline hard target.
 * Purpose:
 * - explicitly target Fictioneer's actual reading-page chapter header partial
 * - centre and brand the chapter identity block with the same gold/silver language
 * - avoid relying on softer generic selectors when the exact markup is known
 */
.main.chapter header.chapter__headline.layout-links {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  width: 100%;
  margin: 0 auto 1.6rem;
  text-align: center !important;
}

.main.chapter header.chapter__headline.layout-links > .chapter__story-link,
.main.chapter header.chapter__headline.layout-links > .chapter__title,
.main.chapter header.chapter__headline.layout-links > .chapter__author {
  display: block;
  width: 100%;
  margin-inline: auto;
  text-align: center !important;
}

.main.chapter header.chapter__headline.layout-links > .chapter__story-link {
  font-family: "Lato", var(--ff-base);
  font-size: clamp(0.8rem, 0.28vw + 0.74rem, 0.94rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

.main.chapter header.chapter__headline.layout-links > .chapter__story-link::after {
  content: "";
  display: block;
  width: min(68px, 44%);
  height: 1px;
  margin: 0.34rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
  opacity: 0.8;
}

.main.chapter header.chapter__headline.layout-links > .chapter__title {
  max-width: min(18ch, 100%);
  margin-top: 0.26rem;
  font-family: "Cinzel", var(--ff-heading);
  font-size: clamp(1.8rem, 2.3vw, 2.45rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.04em;
  text-wrap: balance;
  background: var(--zy-cohesion-gold-metallic);
  background-image: var(--zy-cohesion-gold-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: var(--zy-cohesion-title-shadow-strong);
}

.main.chapter header.chapter__headline.layout-links > .chapter__author {
  margin-top: 0.06rem;
  font-family: "Lato", var(--ff-base);
  font-size: clamp(0.76rem, 0.22vw + 0.72rem, 0.88rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

.main.chapter header.chapter__headline.layout-links > .chapter__author a {
  display: inline;
  background: inherit;
  background-image: inherit;
  background-size: inherit;
  background-repeat: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: inherit;
}

.main.chapter header.chapter__headline.layout-links > .chapter__story-link:hover,
.main.chapter header.chapter__headline.layout-links > .chapter__author a:hover {
  filter: brightness(1.08);
}

@media only screen and (max-width: 640px) {
  .main.chapter header.chapter__headline.layout-links {
    margin-bottom: 1.35rem;
  }

  .main.chapter header.chapter__headline.layout-links > .chapter__story-link {
    letter-spacing: 0.09em;
  }

  .main.chapter header.chapter__headline.layout-links > .chapter__title {
    max-width: min(16ch, 100%);
    font-size: clamp(1.55rem, 6.2vw, 2rem);
  }
}


/* v1.33.4 chapter-page enqueue/specificity hardening.
 * Purpose:
 * - catch real single-fcn_chapter body context even if view gating was too strict before
 * - give the chapter reading-page identity block an unmistakable owner path
 */
body.single-fcn_chapter .chapter__headline.layout-links {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  gap: 0.32rem;
  margin: 0 auto 1.6rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  text-align: center !important;
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__story-link,
body.single-fcn_chapter .chapter__headline.layout-links > .chapter__title,
body.single-fcn_chapter .chapter__headline.layout-links > .chapter__author {
  display: block !important;
  width: 100%;
  margin-inline: auto;
  text-align: center !important;
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__story-link {
  font-family: "Lato", var(--ff-base) !important;
  font-size: clamp(0.8rem, 0.28vw + 0.74rem, 0.94rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  line-height: 1.1;
  text-transform: uppercase;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__story-link::after {
  content: "";
  display: block;
  width: min(68px, 44%);
  height: 1px;
  margin: 0.34rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
  opacity: 0.8;
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__title {
  max-width: min(18ch, 100%);
  margin-top: 0.26rem;
  font-family: "Cinzel", var(--ff-heading) !important;
  font-size: clamp(1.8rem, 2.3vw, 2.45rem) !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
  letter-spacing: 0.04em !important;
  text-wrap: balance;
  background: var(--zy-cohesion-gold-metallic);
  background-image: var(--zy-cohesion-gold-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: var(--zy-cohesion-title-shadow-strong);
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__author {
  margin-top: 0.06rem;
  font-family: "Lato", var(--ff-base) !important;
  font-size: clamp(0.76rem, 0.22vw + 0.72rem, 0.88rem) !important;
  font-style: normal;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__author a {
  display: inline;
  background: inherit;
  background-image: inherit;
  background-size: inherit;
  background-repeat: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: inherit;
}

body.single-fcn_chapter .chapter__headline.layout-links > .chapter__story-link:hover,
body.single-fcn_chapter .chapter__headline.layout-links > .chapter__author a:hover {
  filter: brightness(1.08);
}

@media only screen and (max-width: 640px) {
  body.single-fcn_chapter .chapter__headline.layout-links {
    margin-bottom: 1.35rem;
  }

  body.single-fcn_chapter .chapter__headline.layout-links > .chapter__story-link {
    letter-spacing: 0.09em !important;
  }

  body.single-fcn_chapter .chapter__headline.layout-links > .chapter__title {
    max-width: min(16ch, 100%);
    font-size: clamp(1.55rem, 6.2vw, 2rem) !important;
  }
}


/* v1.33.5 navigation + metadata + chapter-list cohesion pass.
 * Purpose:
 * - make chapter action rails feel like part of the Zyrenicus component system
 * - turn inner-page metadata into deliberate chips rather than plain text crumbs
 * - lift chapter lists / chapter index / collection entry lists out of stock-theme plainness
 */

:where(.main.story, .main.chapter, .main.collection, .main.archive, .main.singular) {
  --zy-cohesion-panel-bg: linear-gradient(180deg, rgba(40, 46, 57, 0.82), rgba(18, 22, 30, 0.90));
  --zy-cohesion-panel-border: rgba(255, 214, 140, 0.16);
  --zy-cohesion-panel-border-strong: rgba(255, 214, 140, 0.28);
  --zy-cohesion-row-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.016));
  --zy-cohesion-row-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
}

.main.chapter .chapter__actions {
  gap: 0.75rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--zy-cohesion-panel-border);
  border-radius: 16px;
  background: var(--zy-cohesion-panel-bg);
  box-shadow: var(--zy-cohesion-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.main.chapter .chapter__actions-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
}

.main.chapter .chapter__actions .button,
.main.chapter .chapter__actions .popup-menu-toggle,
.main.chapter .chapter__actions a.button {
  border-radius: 999px;
}

.main.chapter .chapter__actions .button._navigation {
  min-width: 7.75rem;
  justify-content: center;
}

.main.chapter .chapter__actions .anchor.button,
.main.chapter .chapter__actions .button--bookmark,
.main.chapter .chapter__actions .button--fullscreen,
.main.chapter .chapter__actions .open,
.main.chapter .chapter__actions .popup-menu-toggle {
  min-width: 2.3rem;
  min-height: 2.3rem;
}

.main.chapter .chapter__actions .popup-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.main.chapter .chapter__actions--top {
  margin-bottom: 1.15rem;
}

.main.chapter .chapter__footer.chapter__actions--bottom {
  margin-top: 1.5rem;
}

.story__meta,
.chapter-group__list-item-subrow,
.post-list-item__meta,
.card__footer-box {
  gap: 0.45rem;
}

:where(.chapter-group__list-item-subrow, .post-list-item__meta, .card__footer-box) > :is(span, time),
.card__footer-box > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 27px;
  padding: 0 0.62rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 214, 140, 0.14);
  box-shadow: var(--zy-cohesion-pill-shadow);
  line-height: 1.15;
}

:where(.chapter-group__list-item-subrow, .post-list-item__meta, .card__footer-box) > :is(span, time) :is(i, .icon),
.card__footer-box > span :is(i, .icon) {
  color: rgba(255, 214, 140, 0.76);
}

.card__footer-box > .separator-dot,
.chapter-group__list-item-subrow > .separator-dot,
.post-list-item__meta > .separator-dot {
  display: none;
}

.story__chapters .chapter-group,
.dialog-modal._chapter-index .chapter-group {
  border: 1px solid var(--zy-cohesion-panel-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(33, 38, 48, 0.78), rgba(18, 22, 29, 0.88));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  overflow: clip;
}

.story__chapters .chapter-group + .chapter-group,
.dialog-modal._chapter-index .chapter-group + .chapter-group {
  margin-top: 1rem;
}

.story__chapters .chapter-group__name,
.dialog-modal._chapter-index .chapter-group__name {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.88rem 1rem 0.84rem;
  font-family: "Cinzel", var(--ff-heading);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(247, 239, 223, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border-bottom: 1px solid rgba(255, 214, 140, 0.12);
}

.story__chapters .chapter-group__heading-icon,
.dialog-modal._chapter-index .chapter-group__heading-icon {
  color: rgba(255, 214, 140, 0.82);
}

.story__chapters .chapter-group__list,
.dialog-modal._chapter-index .chapter-group__list {
  padding: 0.45rem;
}

.story__chapters .chapter-group__list-item,
.dialog-modal._chapter-index .chapter-group__list-item,
.card__link-list-item {
  border-radius: 14px;
  background: var(--zy-cohesion-row-bg);
  border: 1px solid transparent;
  transition: background var(--transition-duration), border-color var(--transition-duration), transform var(--transition-duration), box-shadow var(--transition-duration);
}

.story__chapters .chapter-group__list-item:hover,
.dialog-modal._chapter-index .chapter-group__list-item:hover,
.card__link-list-item:hover {
  background: var(--zy-cohesion-row-bg-hover);
  border-color: rgba(255, 214, 140, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.story__chapters .chapter-group__list-item-link,
.dialog-modal._chapter-index .chapter-group__list-item-link,
.card__link-list-link {
  color: rgba(245, 238, 225, 0.95);
  transition: color var(--transition-duration);
}

.story__chapters .chapter-group__list-item-link,
.dialog-modal._chapter-index .chapter-group__list-item-link {
  font-family: "Lato", var(--ff-base);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.story__chapters .chapter-group__list-item:hover .chapter-group__list-item-link,
.dialog-modal._chapter-index .chapter-group__list-item:hover .chapter-group__list-item-link,
.card__link-list-item:hover .card__link-list-link {
  color: #fff8ea;
}

.story__chapters .chapter-group__list-item-icon,
.dialog-modal._chapter-index .chapter-group__list-item-icon,
.card__link-list-item .fa-caret-right {
  color: rgba(255, 214, 140, 0.82);
}

.story__chapters .chapter-group__list-item-status,
.dialog-modal._chapter-index .chapter-group__list-item-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.35rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 214, 140, 0.11);
  border: 1px solid rgba(255, 214, 140, 0.18);
  color: rgba(255, 240, 208, 0.92);
  font-size: 0.76em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story__chapters .chapter-group__folding-toggle,
.dialog-modal._chapter-index .chapter-group__folding-toggle {
  width: 100%;
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 214, 140, 0.16);
  color: rgba(245, 238, 225, 0.94);
  font-family: "Lato", var(--ff-base);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.story__chapters .chapter-group__folding-toggle:hover,
.dialog-modal._chapter-index .chapter-group__folding-toggle:hover {
  border-color: rgba(255, 214, 140, 0.26);
  color: #fff8ea;
}

.card__link-list {
  gap: 0.4rem;
}

.card__link-list-item {
  padding-inline: 0.55rem;
}

.card__link-list-item .card__right {
  color: rgba(228, 218, 204, 0.82);
}

.card__link-list-item .type {
  color: rgba(255, 214, 140, 0.84);
}

@media only screen and (max-width: 768px) {
  .main.chapter .chapter__actions {
    padding: 0.62rem 0.65rem;
    border-radius: 14px;
  }

  .main.chapter .chapter__actions-container {
    gap: 0.35rem;
  }

  .main.chapter .chapter__actions .button._navigation {
    min-width: 0;
  }

  :where(.chapter-group__list-item-subrow, .post-list-item__meta, .card__footer-box) > :is(span, time),
  .card__footer-box > span {
    min-height: 25px;
    padding: 0 0.5rem;
  }

  .story__chapters .chapter-group__name,
  .dialog-modal._chapter-index .chapter-group__name {
    padding-inline: 0.8rem;
    letter-spacing: 0.055em;
  }

  .card__link-list-item {
    padding-inline: 0.4rem;
  }
}


/* v1.33.6 chapter headline fallback hard target.
 * Purpose:
 * - stop relying on body/main context for live reading-page title styling
 * - target the exact Fictioneer chapter headline markup directly
 * - ensure chapter pages inherit the centered gold/silver identity block
 */
header.chapter__headline.layout-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.32rem;
  margin: 0 auto 1.6rem;
  text-align: center;
}

header.chapter__headline.layout-links > .chapter__story-link,
header.chapter__headline.layout-links > .chapter__title,
header.chapter__headline.layout-links > .chapter__author {
  display: block;
  width: 100%;
  margin-inline: auto;
  text-align: center;
}

header.chapter__headline.layout-links > .chapter__story-link {
  font-family: "Lato", var(--ff-base) !important;
  font-size: clamp(0.8rem, 0.28vw + 0.74rem, 0.94rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  line-height: 1.1;
  text-transform: uppercase;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

header.chapter__headline.layout-links > .chapter__story-link::after {
  content: "";
  display: block;
  width: min(68px, 44%);
  height: 1px;
  margin: 0.34rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
  opacity: 0.8;
}

header.chapter__headline.layout-links > .chapter__title {
  max-width: min(18ch, 100%);
  margin-top: 0.26rem;
  font-family: "Cinzel", var(--ff-heading) !important;
  font-size: clamp(1.8rem, 2.3vw, 2.45rem) !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
  letter-spacing: 0.04em !important;
  text-wrap: balance;
  background: var(--zy-cohesion-gold-metallic);
  background-image: var(--zy-cohesion-gold-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: var(--zy-cohesion-title-shadow-strong);
}

header.chapter__headline.layout-links > .chapter__author {
  margin-top: 0.06rem;
  font-family: "Lato", var(--ff-base) !important;
  font-size: clamp(0.76rem, 0.22vw + 0.72rem, 0.88rem) !important;
  font-style: normal;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  background: var(--zy-cohesion-silver-metallic);
  background-image: var(--zy-cohesion-silver-metallic);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.30), 0 0 18px rgba(220, 230, 245, 0.12);
}

header.chapter__headline.layout-links > .chapter__author a {
  display: inline;
  background: inherit;
  background-image: inherit;
  background-size: inherit;
  background-repeat: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: inherit;
}

header.chapter__headline.layout-links > .chapter__story-link:hover,
header.chapter__headline.layout-links > .chapter__author a:hover {
  filter: brightness(1.08);
}

@media only screen and (max-width: 640px) {
  header.chapter__headline.layout-links {
    margin-bottom: 1.35rem;
  }

  header.chapter__headline.layout-links > .chapter__story-link {
    letter-spacing: 0.09em !important;
  }

  header.chapter__headline.layout-links > .chapter__title {
    max-width: min(16ch, 100%);
    font-size: clamp(1.55rem, 6.2vw, 2rem) !important;
  }
}
