/* All selectors are scoped to a collection reader or its explicit author preview.
   No resets, fonts, rules or assets on unrelated editorial content. */
.rg-collection-story {
  --rg-story-accent:#70458b; --rg-story-background:#f3edf8; --rg-story-text:#52445e;
  --rg-story-border:#dcd0e6; --rg-story-option:#fff; --rg-story-premium:#e7daf1;
  --rg-story-radius:12px; --rg-story-paper:#fcf9f4; --rg-story-paper-text:#433b37;
  --rg-story-paper-link:#74488d; --rg-story-paper-muted:#806e68;
  --rg-story-ui:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --rg-story-serif:Georgia,"Times New Roman",serif;
  overflow-wrap:anywhere;
}
.rg-collection-story.rg-story-theme-detective {--rg-story-accent:#60513b;--rg-story-background:#eeeae2;--rg-story-text:#423d34;--rg-story-border:#cfc6b7;--rg-story-option:#fffdf8;--rg-story-premium:#e0d6c3;--rg-story-paper:#f6f2e9;--rg-story-paper-text:#423b31;--rg-story-paper-link:#67512f;--rg-story-paper-muted:#74634f}
.rg-collection-story.rg-story-theme-fantasy {--rg-story-accent:#f3d9a1;--rg-story-background:#27372e;--rg-story-text:#f2eadc;--rg-story-border:#63705c;--rg-story-option:#303f35;--rg-story-premium:#435342;--rg-story-paper:#26352d;--rg-story-paper-text:#f4ead8;--rg-story-paper-link:#f0d39a;--rg-story-paper-muted:#d2c4ac}
.rg-collection-story.rg-story-theme-horror {--rg-story-accent:#f3b4be;--rg-story-background:#30272d;--rg-story-text:#f4e3e7;--rg-story-border:#75515c;--rg-story-option:#3c3037;--rg-story-premium:#593541;--rg-story-paper:#292329;--rg-story-paper-text:#f4e4e6;--rg-story-paper-link:#f6b6c1;--rg-story-paper-muted:#d6b8bf}
.rg-collection-story.rg-story-theme-cyberpunk {--rg-story-accent:#93f0e2;--rg-story-background:#18333d;--rg-story-text:#e0f6f4;--rg-story-border:#396670;--rg-story-option:#22434d;--rg-story-premium:#2a525b;--rg-story-paper:#172f39;--rg-story-paper-text:#e2f5f4;--rg-story-paper-link:#93f0e2;--rg-story-paper-muted:#b0d5d4}
/* Default paper is light regardless of insert palette. */
.rg-collection-story.rg-story-paper-default {--rg-story-paper:#fcf9f4;--rg-story-paper-text:#433b37;--rg-story-paper-link:#74488d;--rg-story-paper-muted:#806e68}
.rg-collection-story.rg-story-paper-transparent {--rg-story-paper:transparent;--rg-story-paper-text:#433b37;--rg-story-paper-link:#74488d;--rg-story-paper-muted:#806e68}
.rg-collection-story.rg-story-paper-custom {--rg-story-paper:#fcf9f4;--rg-story-paper-text:#433b37;--rg-story-paper-link:currentColor;--rg-story-paper-muted:currentColor}
.rg-collection-story.rg-collection-story--book {
  font-family:var(--rg-story-serif);font-size:clamp(16px,2.4vw,18px);line-height:1.85;
  background:var(--rg-story-paper);color:var(--rg-story-paper-text);
  font-variant-ligatures:common-ligatures;font-kerning:normal;
}
.rge-collection .rge-collection__dialog-content.rg-collection-story--book {font-family:var(--rg-story-serif);font-size:clamp(16px,2.4vw,18px);line-height:1.85;color:var(--rg-story-paper-text);background:var(--rg-story-paper);padding:clamp(20px,4vw,40px) clamp(18px,5vw,48px) 36px;}
.rg-collection-story.rg-collection-story--book > p {margin:0 0 .95em;font-size:inherit;line-height:inherit;}
.rge-collection .rg-collection-story.rg-collection-story--book > p {margin:0 0 .95em;font-size:inherit;line-height:inherit;}
.rg-collection-story.rg-collection-story--book > :is(h2,h3,h4),.rge-collection .rg-collection-story.rg-collection-story--book > :is(h2,h3,h4) {font-family:var(--rg-story-serif);font-size:1.5em;font-weight:400;line-height:1.35;color:inherit;text-align:center;margin:1.5em 0 .8em;}
.rg-collection-story.rg-collection-story--book :is(strong,b),.rge-collection .rg-collection-story.rg-collection-story--book :is(strong,b) {color:inherit;font-weight:700;}
.rg-collection-story.rg-collection-story--book a,.rge-collection .rg-collection-story.rg-collection-story--book a {color:var(--rg-story-paper-link);text-decoration:underline;text-underline-offset:2px;}
.rg-collection-story.rg-collection-story--book > blockquote,.rge-collection .rg-collection-story.rg-collection-story--book > blockquote {background:none;border-left:2px solid currentColor;color:inherit;margin:1.3em 0;padding:.3em 1em;font-style:italic;}
.rg-collection-story.rg-collection-story--book > :is(ul,ol) {margin:1em 0 1.2em;padding-left:1.5em;}
.rg-collection-story.rg-story-dropcap > p.rg-story-opening::first-letter {float:left;font-size:3.3em;line-height:.83;margin:.12em .12em 0 0;font-weight:400;color:inherit;}
.rg-collection-story.rg-story-dropcap > p:nth-child(1 of p:not(:has(img))):not(.rg-story-no-dropcap)::first-letter {float:left;font-size:3.3em;line-height:.83;margin:.12em .12em 0 0;font-weight:400;color:inherit;}
.rg-collection-story.rg-story-illustrations-book > :is(figure,.wp-caption),.rge-collection .rg-collection-story.rg-story-illustrations-book > :is(figure,.wp-caption) {margin:2em auto;text-align:center;}
.rg-collection-story.rg-story-illustrations-book img,.rge-collection .rg-collection-story.rg-story-illustrations-book img {display:block;max-width:100%;height:auto;margin:1.6em auto;border-radius:4px!important;clip-path:none!important;box-shadow:0 6px 24px #241e2120;}
.rg-collection-story.rg-story-illustrations-book :is(figcaption,.wp-caption-text),.rge-collection .rg-collection-story.rg-story-illustrations-book :is(figcaption,.wp-caption-text) {font:italic 13px/1.6 var(--rg-story-serif);color:var(--rg-story-paper-muted);margin:.7em auto;}
/* Components are static content; choice rows never look like executable buttons. */
.rg-collection-story .rg-story-box {box-sizing:border-box;font:400 14px/1.6 var(--rg-story-ui);color:var(--rg-story-text);background:var(--rg-story-background);border:1px solid var(--rg-story-border);border-radius:var(--rg-story-radius);padding:16px;margin:1.4em 0;overflow-wrap:anywhere;}
.rge-collection .rg-collection-story .rg-story-box :is(strong,b),.rg-collection-story .rg-story-box :is(strong,b) {color:inherit;font-weight:700;}
.rge-collection .rg-collection-story .rg-story-box p,.rg-collection-story .rg-story-box p {font:inherit;margin:0 0 .55em;color:inherit;}
.rg-collection-story .rg-story-box > :last-child,.rge-collection .rg-collection-story .rg-story-box > :last-child {margin-bottom:0;}
.rg-collection-story .rg-story-title,.rge-collection .rg-collection-story .rg-story-title {display:block;font:700 1.04em/1.45 var(--rg-story-ui);color:var(--rg-story-accent);margin:0 0 6px;}
.rg-collection-story .rg-story-label {display:block;text-transform:uppercase;letter-spacing:.085em;font:600 12px/1.4 var(--rg-story-ui);color:var(--rg-story-accent);margin-bottom:8px;}
.rg-collection-story .rg-story-icon {display:inline-block;font-size:1.35em;margin-right:.4em;vertical-align:middle;}
.rg-collection-story .rg-story-media,.rge-collection .rg-collection-story .rg-story-media {display:block!important;float:none!important;width:54px!important;height:54px!important;object-fit:contain!important;margin:0 0 8px!important;border-radius:8px!important;clip-path:none!important;box-shadow:none!important;}
.rg-collection-story .rg-story-box--romance {--rg-story-accent:#9b3f69;--rg-story-background:#fbeef3;--rg-story-text:#70445b;--rg-story-border:#ebcdda;}
.rg-collection-story .rg-story-box--warning {--rg-story-accent:#905b16;--rg-story-background:#fff4e5;--rg-story-text:#694e28;--rg-story-border:#ead6b6;}
.rg-collection-story .rg-story-box--success {--rg-story-accent:#316d4a;--rg-story-background:#edf6ee;--rg-story-text:#365a40;--rg-story-border:#cbe3cf;}
.rg-collection-story .rg-story-box--error {--rg-story-accent:#a23f4c;--rg-story-background:#fceef0;--rg-story-text:#763e48;--rg-story-border:#edccd2;}
.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-box--romance {--rg-story-accent:#ffbad5;--rg-story-background:#402d3c;--rg-story-text:#f7d9e7;--rg-story-border:#865971;}
.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-box--warning {--rg-story-accent:#ffda99;--rg-story-background:#453827;--rg-story-text:#f8e5c4;--rg-story-border:#806747;}
.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-box--success {--rg-story-accent:#b3edbd;--rg-story-background:#2b4034;--rg-story-text:#d9f3de;--rg-story-border:#587c62;}
.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-box--error {--rg-story-accent:#ffb5bb;--rg-story-background:#482b35;--rg-story-text:#f8dade;--rg-story-border:#875160;}
.rg-collection-story .rg-story-option {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--rg-story-border);border-radius:calc(var(--rg-story-radius) * .66);padding:10px 12px;margin:8px 0 0;background:var(--rg-story-option);color:var(--rg-story-text);}
.rg-collection-story .rg-story-option--premium {background:var(--rg-story-premium);}
.rg-collection-story .rg-story-option--selected {border-color:var(--rg-story-accent);box-shadow:inset 3px 0 var(--rg-story-accent);}
.rg-collection-story .rg-story-price {flex:0 0 auto;max-width:45%;text-align:right;font-weight:700;color:var(--rg-story-accent);white-space:normal;overflow-wrap:anywhere;}
.rg-collection-story .rg-story-stat {font-weight:700;margin:5px 0;color:var(--rg-story-accent);}
.rg-collection-story .rg-story-stat--positive {color:#326f47;}.rg-collection-story .rg-story-stat--negative {color:#a0404d;}
.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-stat--positive {color:#b4edbf;}.rg-collection-story:is(.rg-story-theme-fantasy,.rg-story-theme-horror,.rg-story-theme-cyberpunk) .rg-story-stat--negative {color:#ffb5bb;}
.rg-collection-story .rg-story-chat-message {box-sizing:border-box;width:fit-content;max-width:88%;padding:10px 13px;margin:8px 0;background:var(--rg-story-option);border-radius:12px 12px 12px 3px;}
.rg-collection-story .rg-story-chat-message--out {margin-left:auto;background:var(--rg-story-premium);border-radius:12px 12px 3px 12px;}
.rg-collection-story .rg-story-chat-sender {display:block;font-size:12px;font-weight:700;color:var(--rg-story-accent);margin:0 0 3px;}
.rg-collection-story .rg-story-box--chat > .rg-story-title {text-align:center;}
.rg-collection-story .rg-story-box--final {text-align:center;padding:22px 16px;}
.rg-collection-story .rg-story-box--final .rg-story-icon {display:block;font-size:28px;margin:0 auto 6px;}
.rg-collection-story .rg-story-box--final .rg-story-media {margin:0 auto 8px!important;}
/* Literary elements. */
.rg-collection-story .rg-story-divider {display:flex;align-items:center;justify-content:center;gap:14px;min-height:24px;margin:1.7em auto;color:inherit;opacity:.65;font:400 17px/1.5 var(--rg-story-serif);text-align:center;}
.rg-collection-story .rg-story-divider::before,.rg-collection-story .rg-story-divider::after {content:"";width:clamp(32px,15%,84px);height:1px;background:currentColor;opacity:.42;}
.rg-collection-story .rg-story-divider .rg-story-divider-symbol {font-size:0;}
.rg-collection-story .rg-story-divider .rg-story-divider-symbol::after {content:"✦";font-size:17px;}
.rg-collection-story.rg-story-divider-ornament .rg-story-divider-symbol::after {content:"❦";font-size:22px;}
.rg-collection-story.rg-story-divider-stars .rg-story-divider-symbol::after {content:"✦ ✧ ✦";letter-spacing:4px;}
.rg-collection-story.rg-story-divider-line .rg-story-divider-symbol {display:none;}
.rg-collection-story.rg-story-divider-line .rg-story-divider {gap:0;}
.rg-collection-story .rg-story-scene {text-align:center;margin:1.8em 0;color:inherit;}
.rg-collection-story .rg-story-scene-meta {font:600 12px/1.5 var(--rg-story-ui);letter-spacing:.09em;text-transform:uppercase;opacity:.8;}
.rg-collection-story .rg-story-scene-title {font:400 1.45em/1.3 var(--rg-story-serif);margin:7px 0 0;}
.rg-collection-story .rg-story-thought {font-style:italic;text-align:center;margin:1.4em auto;padding:0 1em;max-width:95%;}
.rg-collection-story .rg-story-letter {font:italic 1em/1.8 var(--rg-story-serif);margin:1.5em 0;padding:1.2em 1.4em;background:var(--rg-story-background);color:var(--rg-story-text);border:1px solid var(--rg-story-border);border-radius:4px;}
.rg-collection-story .rg-story-letter .rg-story-signature {text-align:right;margin-top:1em;}
.rg-collection-story .rg-story-letter .rg-story-letter-title {font-weight:700;margin-bottom:.6em;}
.rg-collection-story .rg-story-letter p {margin:.3em 0;color:inherit;}
@media(max-width:540px){.rg-collection-story .rg-story-box{padding:12px;font-size:14px}.rg-collection-story .rg-story-option{padding:9px 10px;gap:8px}.rg-collection-story .rg-story-chat-message{max-width:94%}.rg-collection-story .rg-story-letter{padding:1em}.rge-collection .rge-collection__dialog-content.rg-collection-story--book{font-size:16px;line-height:1.8}}

/* Book chrome belongs to this reader only; existing standard header is untouched. */
.rge-collection .rge-collection__dialog.rg-story-reader-book {border-radius:14px;}
.rge-collection .rg-story-reader-book .rge-collection__dialog-header {background:#f8f2eb;border-color:#e6ddd1;padding-top:20px;padding-bottom:18px;}
.rge-collection .rg-story-reader-book .rge-collection__dialog-header h2 {font:400 clamp(22px,3vw,30px)/1.25 var(--rg-story-serif,Georgia,serif);color:#433b37;}
.rge-collection .rg-story-reader-book .rge-collection__eyebrow {color:#806e68;}
.rge-collection .rg-story-reader-book .rge-collection__dialog-close {color:#64545b;border-color:#ded5cf;background:#fff;}
