/* Flow navigation has its own markup: never inherit the legacy circular span badge. */
/* Decision desk: one pair in focus, supporting actions clearly separate. */
@media(min-width:1100px){body[data-view=readings]:is([data-flow-stage=choices],[data-flow-stage=gm]) #commonReader>.reader-intro{display:none}}
.choice-pair-tabs{display:flex;gap:8px;margin:12px 0 16px;flex-wrap:wrap}
.choice-pair-tabs .flow-step{flex:1;min-height:42px;margin:0;padding:8px 12px;border:1px solid #3a5265;border-radius:8px;background:#0d2030;color:#b6c8d8;text-align:center}
.choice-pair-tabs .flow-step[aria-current=true]{border-color:#c6ae70;color:#f7e9c6;background:#203247}
.choice-pair-tabs .flow-step-copy b{font:500 .9rem/1.5 sans-serif}
.result-page .flow-instruction{padding:9px 14px;border-left:2px solid #8ca5b9;background:#172b3b;color:#cfdae4;font:400 .875rem/1.7 sans-serif}
.scene-count{align-self:flex-end;font:500 .875rem/1 sans-serif;color:#f0d998;letter-spacing:.1em;margin:0}
.reading-tabs .afterword-yujin{display:block;width:100%;margin:8px 0;padding:12px 14px;border:1px solid #4d6072;border-radius:8px;background:#112737;color:#d9e4ed;font:500 1rem/1.6 sans-serif;text-align:left}
.reading-tabs .afterword-yujin[hidden]{display:none!important}
.result-page[data-stage=choices] .route-choice-card{margin:10px 0 14px;min-height:260px;padding:18px 22px;grid-template-columns:minmax(0,1fr) minmax(240px,43%);gap:10px 20px}
.result-page[data-stage=choices] .route-choice-card>.choice-cast{height:clamp(250px,35dvh,350px);grid-row:1/span 4;width:100%}
.result-page[data-stage=choices] .route-choice-card>.choice-cast img{width:54%;margin:0;max-height:none}
.result-page[data-stage=choices] .route-choice-card>.choice-cast img+img{margin-left:-8%}
.result-page[data-stage=choices] .route-choice-card>button{align-self:center;min-height:58px;text-align:left;justify-content:flex-start}
.result-page[data-stage=choices] .route-choice-card>p{align-self:center;font-size:.95rem}
.result-page[data-stage=choices]>h3{margin:0 0 6px;font-size:1.8rem}
.result-page[data-stage=choices]>p{margin:6px 0;font-size:.95rem;line-height:1.65}
.result-page[data-stage=choices]>textarea{min-height:50px;height:50px;margin:8px 0;padding:10px 14px;font-size:.9rem;resize:vertical}
.result-page[data-stage=choices]>button{margin:4px 8px 0 0;min-height:44px}
.gm-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.result-page .gm-choice-grid .route-choice-card{display:flex;flex-direction:column;gap:10px;margin:8px 0 16px;padding:14px;min-height:0}
.result-page .gm-choice-grid .route-choice-card>.choice-cast{height:clamp(160px,25dvh,250px);width:100%;margin:0;flex:none}
.result-page .gm-choice-grid .route-choice-card>.choice-cast img{width:54%;margin:0}
.result-page .gm-choice-grid .route-choice-card>.choice-cast img+img{margin-left:-8%}
.result-page .gm-choice-grid .route-choice-card>button{min-height:60px;padding:10px;font-size:.9rem;justify-content:flex-start}
.result-page .gm-choice-grid .action-item-icon{width:30px;height:40px;flex-basis:30px}
@media(min-width:1100px){body[data-view=readings]:is([data-flow-stage=choices],[data-flow-stage=gm]) #commonReader{padding-top:20px}body[data-view=readings]:is([data-flow-stage=choices],[data-flow-stage=gm]) #commonReader>.section-label,body[data-view=readings]:is([data-flow-stage=choices],[data-flow-stage=gm]) #commonReader>h2,body[data-view=readings]:is([data-flow-stage=choices],[data-flow-stage=gm]) #commonReader>.reader-notice{display:none}body:is([data-flow-stage=choices],[data-flow-stage=gm]) .reading-workspace:not(.ho-workspace){grid-template-columns:210px minmax(0,1fr) 140px;gap:20px}body:is([data-flow-stage=choices],[data-flow-stage=gm]) .workflow-panel{padding:22px}.result-page[data-stage=gm]>h3{margin:0 0 8px;font-size:1.8rem}}
@media(max-width:1099px){.gm-choice-grid{grid-template-columns:1fr}.result-page .gm-choice-grid .route-choice-card{display:grid;grid-template-columns:minmax(0,1fr) 140px}.result-page .gm-choice-grid .route-choice-card>.choice-cast{grid-column:2;grid-row:1/span 3;height:180px}}
@media(max-width:650px){.result-page[data-stage=choices] .route-choice-card{grid-template-columns:minmax(0,1fr) 150px;padding:16px;gap:12px}.result-page[data-stage=choices] .route-choice-card>.choice-cast{grid-row:1;height:210px;width:150px}.result-page[data-stage=choices] .route-choice-card>button{grid-column:1/-1}.choice-pair-tabs .flow-step{flex-basis:100%;min-height:44px}}
.reader-tools #readerHome,.reader-tools #readingBack{display:block;width:100%;margin:28px 0 0;padding:12px 10px;border:1px solid #4f6477;border-radius:8px;background:transparent;color:#bfccd8;font:400 .875rem/1.6 sans-serif;box-shadow:none;white-space:normal}
.reader-tools #readerHome:hover,.reader-tools #readingBack:hover{background:#203448;color:#fff}
.result-page .route-choice-card>button[aria-pressed=true]:not(:disabled){background:#253c50;color:#fff1c9;border:2px solid #dbc487;box-shadow:inset 4px 0 #dbc487}
.result-page .primary,.next-step .primary{display:inline-flex;align-items:center;justify-content:center;gap:12px}
.action-symbol{display:inline-grid;place-items:center;flex:0 0 1.4em;width:1.4em;font:normal 1.3em/1 serif;opacity:.8}
.action-item-icon{display:inline-block;width:42px;height:48px;flex:0 0 42px;object-fit:contain;border-radius:5px}
.result-page textarea{display:block;box-sizing:border-box;width:100%;min-height:90px;margin:20px 0;padding:16px;border:1px solid #6d8294;border-radius:10px;background:#101f30;color:#e5edf5;font:inherit;line-height:1.7}
#chapterTabs>button{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:14px;row-gap:4px;align-items:center;justify-items:start;text-align:left;min-width:0;width:100%;height:auto;padding:14px 16px;white-space:normal}
#chapterTabs>button>span{grid-column:1;grid-row:1/3;justify-self:start;width:28px;height:28px;margin:0}
#chapterTabs>button>b,#chapterTabs>button>small{grid-column:2;justify-self:stretch;min-width:0;width:100%;margin:0;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
#chapterTabs>button>b{grid-row:1}
#chapterTabs>button>small{grid-row:2}
.story-marker.person-marker>p{white-space:pre-line}
.pair-choice-items.decision-item-illustrations{border:0;margin:20px 0 28px;padding:16px 0;gap:clamp(16px,5vw,56px)}
.decision-item-illustrations>figure{flex:0 1 190px;padding:16px;border:1px solid #796541;border-radius:14px;background:linear-gradient(145deg,#32252a80,#0c1d2c)}
.decision-item-illustrations>figure+figure{border-color:#446e95;background:linear-gradient(145deg,#183c5380,#0c1d2c)}
.decision-item-illustrations img{height:160px;object-fit:contain}
.decision-item-illustrations figcaption{font-size:1.05rem;letter-spacing:.08em;color:#f0e4c5}
@media(max-width:500px){.decision-item-illustrations>figure{flex:1 1 100px;min-width:0;padding:12px}.decision-item-illustrations img{height:120px}}
.inline-reading .pair-scene-cover{display:flex;flex-direction:column;justify-content:flex-end;min-height:260px;padding:clamp(24px,4vw,48px);margin:0 0 32px;border:1px solid #7c7894;border-left:4px solid #b1a0d9;border-radius:16px;background:linear-gradient(90deg,#081320df,#09162330),linear-gradient(0deg,#081320e8,transparent 85%),url('assets/safe-3c8ad8084a43ffbe.webp') center 55%/cover;overflow:hidden}
.inline-reading .pair-scene-cover h3{font:500 clamp(1.7rem,3.5vw,2.8rem)/1.5 serif;letter-spacing:.08em;color:#fff4df;margin:16px 0;text-shadow:0 2px 16px #0009}
.inline-reading .pair-scene-cover .reading-context{font-size:.9rem;line-height:1.7;letter-spacing:.08em;color:#e7d3a5;margin:0}
.inline-reading .pair-scene-cover .scene-place{font-size:.9rem;line-height:1.7;color:#d3deea;margin:0}
@media(max-width:650px){.inline-reading .pair-scene-cover{min-height:210px;padding:24px 20px}}
.reading-tabs .post-vote-stages{display:flex;flex-direction:column;gap:8px;margin:22px 0;padding:0;min-width:0}
.reading-tabs .post-vote-stages>button.flow-step{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:54px;height:auto;margin:0;padding:14px 16px;border:1px solid #334a60;border-radius:10px;background:#0e2132;color:#dae5ee;text-align:left;line-height:1.5;box-shadow:none;white-space:normal;transition:background .18s,border-color .18s}
.reading-tabs .flow-step-copy{flex:1;min-width:0;width:auto;writing-mode:horizontal-tb}
.reading-tabs .flow-step-copy b{display:block;font:500 1rem/1.6 sans-serif;word-break:normal;overflow-wrap:anywhere;white-space:normal;letter-spacing:.02em}
.reading-tabs .flow-step-number{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border:1px solid #647a8c;border-radius:50%;font:500 .9rem/1 sans-serif;color:#dfc889;background:transparent}
.reading-tabs .post-vote-stages>.flow-step.unlocked-reading{margin-left:12px;width:calc(100% - 12px);border-color:transparent;border-left:1px solid #647587;border-radius:0;background:transparent;padding:9px 14px;min-height:44px}
.reading-tabs .post-vote-stages>.flow-step[aria-current=step]{border-color:#c6ae70;background:linear-gradient(100deg,#514a32aa,#172b3d);box-shadow:inset 3px 0 #dfc889;color:#fff2ce}
.reading-tabs .post-vote-stages>.flow-step:hover:not(:disabled){background:#21384b;border-color:#9dafbb}
.reading-tabs .post-vote-stages>.flow-step:focus-visible,.result-page button:focus-visible{outline:2px solid #f0d58c;outline-offset:4px}
.reading-tabs .post-vote-stages>.flow-step:disabled{opacity:.46;cursor:not-allowed}
.result-page[data-stage=choices]>h3{font-size:clamp(1.6rem,3vw,2.4rem);line-height:1.5;margin:0 0 16px;letter-spacing:.08em}
.result-page[data-stage=choices]>p{max-width:48em;font-size:1rem;line-height:1.9;color:#bdccd9;margin-bottom:26px}
.result-page .route-choice-card{--pair-rgb:151,131,218;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:14px 24px;min-width:0;margin:24px 0;padding:24px;border:1px solid rgba(var(--pair-rgb),.55);border-radius:16px;background:linear-gradient(120deg,rgba(var(--pair-rgb),.15),#0c1b2b 74%);overflow:visible}
.result-page .route-choice-card[data-pair=主従]{--pair-rgb:210,117,140}
.result-page .route-choice-card[data-pair=友人]{--pair-rgb:104,173,190}
.result-page .route-choice-card legend{padding:0 10px;color:#f2e2b6;font:600 1.05rem/1.6 sans-serif;letter-spacing:.04em}
.result-page .route-choice-card>.choice-cast{grid-column:2;grid-row:1/span 6;display:flex;align-items:flex-end;justify-content:center;align-self:center;height:180px;width:170px;min-width:0;gap:0;margin:0;pointer-events:none}
.result-page .route-choice-card>.choice-cast img{width:50%;height:100%;min-width:0;object-fit:contain;object-position:bottom;filter:drop-shadow(0 8px 12px #0005)}
.result-page .route-choice-card>p{grid-column:1;margin:0;color:#c5d2dd;font-size:1rem;line-height:1.8;align-self:end}
.result-page .route-choice-card>button{grid-column:1;min-width:0;min-height:48px;width:100%;margin:0;padding:12px 18px;font-size:1rem;line-height:1.6;border-radius:9px;background:#172d40;color:#f0f3f5;border:1px solid #63788a;box-shadow:none;white-space:normal}
.result-page .route-choice-card>button:hover{border-color:#e4cc8f;background:#294057}
.result-page .route-choice-card>button[aria-pressed=true]{background:#d7be77;color:#091726;border-color:#f1dca4}
.result-page .route-choice-card>button[aria-pressed=true]::after{content:' ✓';font-weight:700}
.result-page .route-choice-card .choice-label{white-space:normal;overflow-wrap:anywhere}
.reading-tabs .flow-nav-group{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;min-width:0}
.reading-tabs .flow-nav-group>h4{margin:0;padding:14px 16px;border:1px solid #334a60;border-radius:10px;background:#0e2132;color:#dae5ee;font:500 1rem/1.6 sans-serif}
.reading-tabs .flow-nav-group>.flow-step{display:flex;align-items:center;min-width:0;margin:0 0 0 12px;width:calc(100% - 12px);min-height:44px;height:auto;padding:9px 14px;border:0;border-left:1px solid #647587;border-radius:0;background:transparent;color:#dae5ee;text-align:left;white-space:normal;box-shadow:none}
.reading-tabs .flow-nav-group>.flow-step[aria-current=step]{border:1px solid #c6ae70;background:linear-gradient(100deg,#514a32aa,#172b3d);box-shadow:inset 3px 0 #dfc889;color:#fff2ce}
.reading-tabs .flow-nav-group>.flow-step:hover{background:#21384b}
.reading-tabs .flow-nav-group>.flow-step:focus-visible{outline:2px solid #f0d58c;outline-offset:3px}
.result-page .route-choice-card{grid-template-columns:minmax(0,1fr) minmax(220px,32%);min-height:280px}
.result-page .route-choice-card>.choice-cast{width:100%;height:290px;grid-row:1/span 4}
.result-page .route-choice-card>button:disabled,.result-page .route-choice-card>button:disabled:hover{opacity:1;background:#152230;color:#a9bac9;border:1px dashed #617183;cursor:not-allowed;box-shadow:none}
.result-page .route-choice-card[data-choice-access=view]>p{color:#acbccb}
@media(max-width:650px){.result-page .route-choice-card{grid-template-columns:minmax(0,1fr) 90px;gap:12px;padding:16px}.result-page .route-choice-card>.choice-cast{width:90px;height:125px;grid-row:1}.result-page .route-choice-card>button{grid-column:1/-1}.reading-tabs .post-vote-stages>button.flow-step{padding:12px}.result-page .route-choice-card legend{font-size:1rem}}
@media(max-width:650px){.result-page .route-choice-card{grid-template-columns:minmax(0,1fr) 140px;min-height:0}.result-page .route-choice-card>.choice-cast{width:140px;height:200px}}
@media(prefers-reduced-motion:reduce){.reading-tabs .post-vote-stages>button.flow-step{transition:none}}
@media(min-width:1100px){.result-page[data-stage=choices]>h3{font-size:1.8rem;line-height:1.4;margin:0 0 6px}.result-page[data-stage=choices]>p{font-size:.9rem;line-height:1.65;margin:6px 0}.result-page[data-stage=choices] .choice-pair-tabs{margin:10px 0}.result-page[data-stage=choices] .route-choice-card{min-height:230px}.result-page[data-stage=choices] .route-choice-card>.choice-cast{height:clamp(220px,30dvh,320px)}}

/* Equal choice controls and balanced, inward-facing pair portraits. */
.result-page .route-choice-card>button.primary{box-sizing:border-box;width:100%;min-height:76px;height:4.75rem;padding:12px 18px!important;border-width:2px;gap:14px;flex-shrink:0}
.result-page .route-choice-card>button.primary .action-item-icon,.result-page .route-choice-card>button.primary .action-symbol{display:inline-grid;width:42px;height:48px;flex:0 0 42px;object-fit:contain;place-items:center}
.result-page .route-choice-card>button.primary .choice-label{min-width:0;line-height:1.45}
.result-page .route-choice-card>.choice-cast{display:flex;justify-content:center;align-items:flex-end;overflow:hidden;gap:0}
.result-page .route-choice-card>.choice-cast img{width:auto;height:100%;max-width:55%;max-height:100%;flex:0 1 auto;object-fit:contain;object-position:center bottom;margin:0!important;transform:none}
.result-page .route-choice-card>.choice-cast img:is([alt="レイ"],[alt="フィン"],[alt="ノア"],[alt="ランス"]){transform:scaleX(-1)}
@media(max-width:650px){.result-page .route-choice-card>button.primary{height:auto;min-height:76px}.result-page .route-choice-card>button.primary .choice-label{overflow-wrap:anywhere}}

/* Keep all result inputs together in a compact, single-page form. */
.result-page[data-stage=result] .announced-options{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:10px 0}
.result-page[data-stage=result] .announced-options .cast-vote{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:8px;min-height:110px;min-width:0}
.result-page[data-stage=result] .cast-vote .choice-cast{height:64px;width:100%;margin:0}
.result-page[data-stage=result] .cast-vote .choice-label{white-space:nowrap;font-size:.9rem}
.result-page[data-stage=result] .cast-vote .action-symbol{display:none}
.result-page[data-stage=result] .flow-pair-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.result-page[data-stage=result] .flow-pair-options .choice-cast{height:100px}
.result-page[data-stage=result] .flow-pair-options fieldset{padding:10px;margin:8px 0}
.result-page[data-stage=result] .flow-pair-options .primary{min-height:48px;padding:8px;font-size:.9rem}
.spoiler-warning{border-left:4px solid #dbad68;padding:16px;background:#3a2930;color:#ffe7bf}
@media(max-width:600px){.result-page[data-stage=result] .announced-options{grid-template-columns:repeat(3,minmax(0,1fr))}.result-page[data-stage=result] .flow-pair-options{grid-template-columns:1fr}.result-page[data-stage=result] .flow-pair-options .choice-cast{display:none}}

#guideModal:has(.afterword-picker) .guide-card{width:min(920px,94vw);max-width:920px;padding:32px;max-height:90dvh;overflow:auto}
.afterword-picker h2{margin:0 0 12px}.afterword-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px}
.afterword-picker-item{display:flex;flex-direction:column;gap:8px;min-height:100px;padding:20px;text-align:left;color:#f3ead2;border:1px solid #a58b50;border-radius:12px;background:#172d41;font:inherit;cursor:pointer}
.afterword-picker-item span{color:#b6c7d7;font-size:.9rem}.afterword-picker-item:hover,.afterword-picker-item:focus-visible{background:#284157;outline:2px solid #e1c478;outline-offset:2px}
@media(max-width:600px){.afterword-picker-grid{grid-template-columns:1fr}#guideModal:has(.afterword-picker) .guide-card{padding:24px}}

/* Desktop reading stays within one viewport; columns scroll independently. */
@media(min-width:1100px){
 body[data-view="readings"]{overflow:hidden;height:100dvh}
 body[data-view="readings"] #commonReader{position:fixed;inset:72px 0 0;width:100%;height:auto;max-height:none;margin:0;padding:16px 24px;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden}
 body[data-view="readings"] #commonReader>.section-label,body[data-view="readings"] #commonReader>h2,body[data-view="readings"] #commonReader>.reader-notice,body[data-view="readings"] #commonReader>.reader-intro{display:none}
 body[data-view="readings"] #commonReader>.reading-workspace{flex:1;min-height:0;height:100%;overflow:hidden;align-items:stretch}
 body[data-view="readings"] #commonReader>.reading-workspace>.reading-tabs,body[data-view="readings"] #commonReader>.reading-workspace>.reader-tools,body[data-view="readings"] #commonReader>.reading-workspace>#readingPanel,body[data-view="readings"] #commonReader>.reading-workspace>.workflow-panel{position:relative;top:0;min-height:0;height:100%;max-height:100%;overflow-y:auto;overscroll-behavior:none;scrollbar-gutter:stable;scroll-behavior:auto}
}

.truth-timeline{margin:0 0 32px}.truth-timeline h3{font-size:1.4rem}.truth-timeline>p{font-size:.9rem;color:#b9cbd9}.truth-timeline-scroll{overflow-x:auto;max-width:100%;border:1px solid #526779;border-radius:8px;overscroll-behavior-x:contain}.truth-timeline table{border-collapse:collapse;min-width:1120px;width:100%;font:400 .9rem/1.7 sans-serif}.truth-timeline th,.truth-timeline td{padding:12px;border:1px solid #344b5e;vertical-align:top;min-width:130px}.truth-timeline th{background:#20394b;color:#f7df9f}.truth-timeline tbody th{position:sticky;left:0;min-width:65px}.truth-timeline td{background:#0d2030;color:#e7eef5}

/* Irregular, short-lived embers instead of the repeating dot grid. */
body[data-phase="rebellion"] main:before{display:none!important}
.ember-layer{position:fixed;inset:72px 0 0;pointer-events:none;z-index:1;overflow:hidden;display:none}
body[data-phase="rebellion"] .ember-layer{display:block}
.ember-layer i{position:absolute;left:var(--x);top:var(--y);width:var(--size);height:2px;border-radius:100%;background:#ffda72;box-shadow:0 0 5px #ff7d32,0 0 12px #d9360c;opacity:0;animation:crackle var(--duration) var(--delay) infinite linear}
@keyframes crackle{0%,18%,100%{opacity:0;transform:translate(0,22px) rotate(-38deg) scaleX(.4)}22%{opacity:.9}27%{opacity:.25}32%{opacity:.8}64%{opacity:0;transform:translate(58px,-65px) rotate(-38deg) scaleX(1.3)}}
@media(prefers-reduced-motion:reduce){.ember-layer{display:none!important}}

.history-portrait{display:flex;align-items:center;gap:20px;margin:16px 0 24px}.history-portrait img{width:120px;height:150px;object-fit:cover;object-position:center top;filter:grayscale(1);border:1px solid #8d8c86;border-radius:8px}.history-portrait figcaption{font-size:.85rem;line-height:1.8}.history-portrait a{display:block;color:#d9bb72;font-size:.75rem}

.gm-flow-table,.site-usage-note{margin:24px 0;padding:22px;border:1px solid #8f7c4e;border-radius:12px;background:linear-gradient(140deg,#233a50,#0d1f31 78%)}
.gm-flow-table h4,.site-usage-note h3{margin:0 0 14px;color:#f2d58a;font:700 1rem/1.6 sans-serif;letter-spacing:.06em}
.gm-flow-table ol,.site-usage-note ul{margin:0;padding-left:1.25em}
.gm-flow-table li,.site-usage-note li{padding:8px 0;line-height:1.8}
.gm-flow-table b{display:block;color:#fff5d6;font-family:'Yu Mincho','Hiragino Mincho ProN',serif;font-size:1.05rem}
.gm-flow-table span{display:block;color:#d6e1ea;font-size:.95rem}

/* Active scene cards must stay readable over bright background art. */
.reading-workspace .reading-group-list button.active,
#readingTabs .reading-group-list button.active{
 color:#fff!important;
 text-shadow:0 2px 8px #000,0 0 12px #000!important;
 background:#102136!important;
}
.reading-workspace .reading-group-list button.active:before,
#readingTabs .reading-group-list button.active:before{
 background:linear-gradient(90deg,rgba(5,13,24,.96),rgba(5,13,24,.86)),var(--scene-bg) center/cover no-repeat!important;
 filter:brightness(.82) saturate(.95)!important;
 transform:none!important;
}
.reading-workspace .reading-group-list button.active b,
.reading-workspace .reading-group-list button.active small,
#readingTabs .reading-group-list button.active b,
#readingTabs .reading-group-list button.active small{
 color:#fff!important;
 opacity:1!important;
}
.reading-workspace .reading-group-list button,
#readingTabs .reading-group-list button{
 color:#edf6ff!important;
 text-shadow:0 2px 8px #000,0 0 12px #000!important;
}
.reading-workspace .reading-group-list button b,
#readingTabs .reading-group-list button b{
 color:#fff!important;
 opacity:1!important;
}
.reading-workspace .reading-group-list button small,
#readingTabs .reading-group-list button small{
 color:#cfe0ef!important;
 opacity:1!important;
}

/* UZU-like compact selector for shared scenes. */
.reading-select-panel{display:grid;gap:8px;margin:0 0 16px;padding:14px;border:1px solid #405a72;border-radius:8px;background:#0f2031}
.reading-select-panel label{display:grid;gap:7px;color:#d9bb72;font-weight:700}
.reading-select-panel select{width:100%;min-height:44px;padding:8px 10px;border:1px solid #607992;border-radius:6px;background:#081827;color:#edf6ff;font:inherit}
.reading-select-panel p{margin:0;color:#aebfcb;font-size:.85rem;line-height:1.7}
.reading-tabs .reading-group.select-collapsed{display:none}
@media(min-width:1100px){body[data-view="readings"] .reading-workspace:not(.ho-workspace){grid-template-columns:280px minmax(0,1fr);gap:24px}}

/* Minimal shared-reading rail. */
#readingTabs{border:0!important;background:transparent!important}
#readingTabs>.flow-nav-button,
#readingTabs>.post-vote-stages,
#readingTabs>.session-nav-fold{margin-top:10px}
#readingTabs .reading-group{border:0!important;background:transparent!important;margin:0!important}
#readingTabs .reading-group>summary{display:none!important}
#readingTabs .reading-group-list{padding:0!important;gap:6px!important}
#readingTabs .reading-group-list button{min-height:46px!important;padding:9px 12px!important;border-radius:6px!important;background:#0e2031!important}
#readingTabs .reading-group-list button small{display:none!important}
#readingTabs .reading-select-panel{position:sticky;top:0;z-index:2}
#readingTabs .flow-nav-group>h4{display:none}
@media(min-width:1100px){body[data-view="readings"] #commonReader>.reading-workspace>.reading-tabs{padding-right:0}}

/* Reading view: keep the left side as a simple progress list, not a select box. */
#readingTabs .reading-select-panel{display:none!important}
#readingTabs .reading-group.select-collapsed{display:block!important}
#readingTabs .reading-group{display:block!important;margin:0 0 10px!important;border:1px solid #36536f!important;border-radius:8px!important;background:#0d2235cc!important;overflow:hidden!important}
#readingTabs .reading-group>summary{display:flex!important;min-height:54px!important;padding:12px 14px!important;align-items:center!important;color:#fff!important;font-size:1rem!important}
#readingTabs .reading-group>summary b{font:800 1rem/1.5 sans-serif!important;letter-spacing:0!important}
#readingTabs .reading-group>summary small{display:none!important}
#readingTabs .reading-group[open]>summary{border-bottom:1px solid #36536f!important;color:#f0d58c!important}
#readingTabs .reading-group-list{padding:8px!important;gap:8px!important}
#readingTabs .pair-route-list{padding:8px!important;gap:8px!important}
#readingTabs .pair-route{padding:10px!important;border-radius:8px!important}
#readingTabs .pair-portraits{display:none!important}
#readingTabs .pair-route h4{margin:0 0 8px!important;font-size:.95rem!important}

/* Put reader tools behind a gear so the left rail never collides with the text. */
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools{
 position:fixed!important;
 top:calc(var(--play-header-height,72px) + 12px)!important;
 right:16px!important;
 z-index:40!important;
 display:flex!important;
 width:46px!important;
 height:46px!important;
 max-height:46px!important;
 margin:0!important;
 padding:0!important;
 overflow:hidden!important;
 border:1px solid #5d7893!important;
 border-radius:8px!important;
 background:#081827f2!important;
 box-shadow:0 10px 28px #0008!important;
 color:#edf6ff!important;
 gap:8px!important;
 transition:width .18s ease,max-height .18s ease,padding .18s ease!important;
}
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools:before{
 content:"⚙";
 display:grid;
 place-items:center;
 flex:0 0 46px;
 height:46px;
 color:#f0d58c;
 font:700 1.35rem/1 sans-serif;
}
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools:hover,
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools:focus-within{
 width:min(310px,calc(100vw - 32px))!important;
 height:auto!important;
 max-height:calc(100dvh - var(--play-header-height,72px) - 32px)!important;
 padding:10px!important;
 overflow:auto!important;
}
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools>span{display:none!important}
body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools :is(button,label,.sound-controls){min-width:210px!important}
@media(max-width:760px){body[data-view] :is(#commonReader,#reader) .reading-workspace>.reader-tools{display:none!important}}

/* Pair cards: equal character scale and intentional facing. */
.pair-route .pair-portraits div{height:170px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.pair-route .pair-portraits img{width:auto!important;height:100%!important;max-width:54%!important;object-fit:contain;object-position:center bottom}
.pair-route[data-pair="兄弟"] .pair-portraits img:first-child,
.pair-route[data-pair="主従"] .pair-portraits img:first-child,
.pair-route[data-pair="友人"] .pair-portraits img:first-child{transform:scaleX(-1)}
.pair-route[data-pair="兄弟"] .pair-portraits img:last-child,
.pair-route[data-pair="主従"] .pair-portraits img:last-child,
.pair-route[data-pair="友人"] .pair-portraits img:last-child{transform:none}
#readingTabs .pair-route .pair-portraits{display:flex!important}
