/* v6.4.8 targeted issue remediation. Loaded after all legacy theme files. */
.ryu-records-dialog[data-ryu-journal-theme="premium-velvet"] {--ryu-fix-ink:#f8ecdc;--ryu-fix-sub:#e8d2b9;--ryu-fix-chip:#36232b;--ryu-fix-gold:#e5bf86;}
.ryu-records-dialog[data-ryu-journal-theme="premium-nocturne"] {--ryu-fix-ink:#f6f0e5;--ryu-fix-sub:#e0e2e4;--ryu-fix-chip:#15283d;--ryu-fix-gold:#f0d29c;}
.ryu-records-dialog[data-ryu-journal-theme="premium-ivory"] {--ryu-fix-ink:#302316;--ryu-fix-sub:#4a3525;--ryu-fix-chip:#30241d;--ryu-fix-gold:#e9c590;}
/* Specific element selectors: legacy timeline CSS previously won on <span> even when parent variables changed. */
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-paper.rr-timeline ol > li,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-paper.rr-timeline ol > li > span {
 color:var(--ryu-fix-ink)!important;opacity:1!important;text-shadow:none!important;
}
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-paper.rr-timeline ol > li > time {color:var(--ryu-fix-sub)!important;opacity:1!important;}
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-paper.rr-timeline h3,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-premium-card h3,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-premium-card p,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-premium-card p strong,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-premium-card label,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-paper .rr-genre-row > span {
 color:var(--ryu-fix-ink)!important;opacity:1!important;
}
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-premium-card .rr-premium-small {color:var(--ryu-fix-sub)!important;}
/* Grade label (not only the icon) must contrast with every profile background. */
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-profile .rr-grade-badge,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-profile .rr-premium-seal,
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-profile.rr-profile-theme .rr-premium-seal {
 background:var(--ryu-fix-chip)!important;color:#fff3dc!important;
 border:1px solid #b99a72!important;opacity:1!important;text-shadow:none!important;
}
.ryu-records-dialog[data-ryu-journal-theme^="premium-"] .rr-profile .rr-grade-badge :is(.rr-books,.ryu-grade-stack) {color:var(--ryu-fix-gold)!important;}
/* The separate bookcase surface has its own theme attribute. Headers cannot inherit dark legacy ink. */
#ryu-personal-root[data-ryu-shelf-theme="royal-walnut"] :is(.ryu-personal-heading h2,.ryu-personal-heading p,.ryu-personal-pages,.bookcase-header,.bookcase-header *,.featured-head,.featured-head *, .bookcase-featured),
#ryu-personal-root[data-ryu-shelf-theme="midnight-archive"] :is(.ryu-personal-heading h2,.ryu-personal-heading p,.ryu-personal-pages,.bookcase-header,.bookcase-header *,.featured-head,.featured-head *, .bookcase-featured),
#ryu-personal-root[data-ryu-shelf-theme="heritage-ivory"] :is(.ryu-personal-heading h2,.ryu-personal-heading p,.ryu-personal-pages,.bookcase-header,.bookcase-header *,.featured-head,.featured-head *, .bookcase-featured) {
 color:var(--cabinet-text)!important;opacity:1!important;text-shadow:none!important;
}
#ryu-personal-root[data-ryu-shelf-theme="royal-walnut"] :is(.ryu-personal-heading,.ryu-personal-pages,.bookcase-header,.bookcase-featured),
#ryu-personal-root[data-ryu-shelf-theme="midnight-archive"] :is(.ryu-personal-heading,.ryu-personal-pages,.bookcase-header,.bookcase-featured),
#ryu-personal-root[data-ryu-shelf-theme="heritage-ivory"] :is(.ryu-personal-heading,.ryu-personal-pages,.bookcase-header,.bookcase-featured){background:var(--cabinet-panel)!important;border-color:var(--cabinet-metal)!important;}
/* Board specialties, distinct from the unchanged general-purpose composer. */
.ryu-v648-book-select{display:grid;gap:10px;padding:14px;background:#332820;border:1px solid #9c7650;border-radius:10px}
.ryu-v648-book-label{display:grid;gap:6px;color:#f1d2a2;font-weight:600}
.ryu-v648-book-label select{width:100%;max-width:100%;min-height:42px;background:#1d1c22;color:#f6e5d2;border:1px solid #9b7a54;border-radius:6px}
.ryu-v648-book-preview{display:flex;align-items:center;gap:14px;min-height:92px;color:#f2debf;min-width:0}
.ryu-v648-book-cover{flex:0 0 66px;height:94px;border:1px solid #be9b65;border-radius:5px;display:grid;place-items:center;overflow:hidden;background:#1e1b1a;color:#c9a670;font-size:28px}
.ryu-v648-book-cover img{width:100%;height:100%;object-fit:cover}
.ryu-v648-book-info{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
.ryu-v648-book-info strong{font-size:15px;color:#f5e4c8}
.ryu-v648-book-info small,.ryu-v648-book-info p,.ryu-v648-book-empty{font-size:12px;color:#dcc5a5;line-height:1.6;margin:0}
.ryu-v648-topic-group,.ryu-v648-spoiler-group{border:0;padding:9px 0 13px;margin:0;min-width:0}
.ryu-v648-topic-group legend,.ryu-v648-spoiler-group legend{font-weight:650;color:#f3d39e;margin-bottom:7px}
.ryu-v648-topic-chips{display:flex;gap:7px;flex-wrap:wrap}
.ryu-v648-topic-chips .ryu-v648-chip{border:1px solid #90704c;background:#2c2422;color:#e5d1b8;border-radius:22px;padding:6px 12px;cursor:pointer}
.ryu-v648-topic-chips .ryu-v648-chip[aria-pressed="true"]{background:#d0ad78;color:#281c16;border-color:#e3bc85}
.ryu-v648-spoiler-option{display:flex!important;flex-direction:row!important;gap:9px;align-items:center;margin:10px 0;color:#edd9bd}
.ryu-v648-spoiler-option input{accent-color:#c9a374;min-width:17px;min-height:17px}
.ryu-v648-media-uploader{display:grid;gap:9px;padding:16px;margin:0 0 17px;border:1px dashed #c39b68;border-radius:10px;background:#3a2b26}
.ryu-v648-media-head{display:flex;align-items:center;gap:12px}.ryu-v648-media-head button{min-height:44px;border:1px solid #d0a978;background:#d0a978;color:#231a17;border-radius:7px;padding:8px 15px;font-weight:650;cursor:pointer}
.ryu-v648-media-count,.ryu-v648-media-hint{font-size:12px;line-height:1.6;color:#e7d3b7;margin:0}
.ryu-edit-image-move{min-width:28px;min-height:28px}
@media(max-width:480px){.ryu-v648-book-cover{flex-basis:54px;height:78px}.ryu-v648-book-preview{gap:10px}.ryu-v648-book-select{padding:10px}}
