/* A narrow reference rail shares the scene grid without changing combat. */
body #storySkillReference[hidden]{display:none!important}

body #storySkillReference{min-width:0;min-height:0;overflow:hidden;background:var(--ui-surface,#111e2f)}
body #storySkillReference .story-column-title{flex:none;padding:12px}
body #storySkillReference h3{font-size:14px;margin:0}
body .story-skills-list{overflow-y:auto;min-height:0;padding:6px 9px 12px}
body .story-skills-list section{margin:0 0 9px;padding:0;border:0}
body .story-skills-list h4{font-size:11px;color:var(--ui-muted,#b2c1d4);margin:5px 3px;text-transform:uppercase;letter-spacing:.04em}
body .story-skills-list ul{list-style:none;margin:0;padding:0}
body .story-skills-list li{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 7px;border-bottom:1px solid #34465c;font-size:12px;line-height:1.35;cursor:help;border-radius:4px}
body .story-skills-list abbr{font-size:11px;color:#9dddf7;text-decoration:none;flex:none}
body .story-skills-list li:hover,body .story-skills-list li:focus-visible{background:#20344b;outline:1px solid #7199bc}
body .skill-reference-tooltip{display:none;position:fixed;z-index:10000;max-width:270px;padding:10px 12px;background:#0b1422;color:#e2e8f0;border:1px solid #7199bc;border-radius:7px;font-size:13px;line-height:1.5;pointer-events:none;box-shadow:0 5px 18px #0008}
body .story-skills-list li:hover .skill-reference-tooltip,body .story-skills-list li:focus-visible .skill-reference-tooltip{display:block;left:calc(13vw + 205px);top:auto}



/* Shared scene bounds and rail spacing for Interaction and Combat. */
body #storyWorkspace{--scene-side-width:205px;--scene-workspace-gap:8px}
body #storyWorkspace .story-columns{grid-template-columns:clamp(160px,13vw,260px) minmax(0,1fr)}
body #storyInteractionWorkspace{display:grid;grid-template-columns:var(--scene-side-width) minmax(0,1fr);gap:var(--scene-workspace-gap);padding:8px;flex:1;min-height:0;min-width:0;overflow:hidden}
body #storyInteractionWorkspace[hidden]{display:none!important}
body #storyInteractionWorkspace #storyDocument{height:100%!important;min-width:0;min-height:0;padding:0;margin:0}
body #storyInteractionWorkspace #storySkillReference{display:flex;flex-direction:column;height:100%;box-sizing:border-box;border-radius:12px;padding:10px}
body #storySkillReference .story-column-title{padding:0 0 10px;border-bottom:1px solid #40536d;background:transparent}
body #storySkillReference .story-skills-list{padding:6px 0 0}
body #storyCombatDock .combat-workspace{grid-template-columns:var(--scene-side-width) minmax(0,1fr)!important;gap:var(--scene-workspace-gap);padding:8px!important}
body #storyCombatDock #combatLeftColumn,body #storyCombatDock #initiativeRail{width:100%;min-width:0;box-sizing:border-box}
@media(max-width:1100px){body #storyWorkspace{--scene-side-width:180px}body #storyWorkspace .story-columns{grid-template-columns:160px minmax(0,1fr)}body #storyCombatDock .enemy-five-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(250px,1fr))!important;overflow:auto}body #storyCombatDock .player-enemy-grid{grid-template-columns:1fr}}
@media(max-width:750px){body #storyWorkspace .story-columns{grid-template-columns:1fr}body #storyInteractionWorkspace{grid-template-columns:150px minmax(0,1fr)}body #storyWorkspace{--scene-side-width:150px}}

@media(min-width:751px) and (max-width:1500px){body #storyWorkspace .story-selected-heading{grid-template-columns:minmax(0,1fr) auto}body #storyWorkspace .story-selected-title{grid-column:1;grid-row:1}body #storyWorkspace .story-step-navigation{grid-column:2;grid-row:1}body #storyWorkspace #storySceneMusic{grid-column:1/-1;grid-row:2;min-width:0}body #storyWorkspace #sceneMusicSettings{justify-content:flex-start;flex-wrap:wrap}}
