html.role-picker-open{overflow:hidden}
#role-dialog{width:min(680px,calc(100% - 32px));max-height:calc(100svh - 32px);padding:26px;overscroll-behavior:contain;box-sizing:border-box}
#role-dialog .dialog-head{margin-bottom:12px;gap:12px}
#role-title{font-size:27px;line-height:1.4;outline:none}
.role-intro{font-size:13px;line-height:1.8;margin:0 0 18px;color:var(--muted)}
.role-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.role-choice{display:flex;flex-direction:column;align-items:center;min-width:0;padding:10px 6px 13px;border:1px solid var(--line);background:transparent;color:var(--ink);text-align:center}
.role-choice-art{display:block;height:102px;width:110px;max-width:100%;pointer-events:none}
.role-choice-art svg{width:100%;height:100%}
.role-choice strong{font:600 17px/1.5 var(--serif)}
.role-choice-age{font:500 13px/1.6 var(--font);color:var(--coral);margin:1px 0 2px}
.role-choice>span:last-child{font:11px/1.6 var(--font);color:var(--muted)}
.role-choice[aria-pressed=true]{border-color:var(--coral);background:#a13c2f09}
@media(hover:hover){.role-choice:hover{border-color:var(--coral);background:#a13c2f09}}
.role-choice:focus-visible,.role-view-actions button:focus-visible{outline:2px solid var(--coral);outline-offset:3px}
.role-entry-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:16px}
.role-entry-foot p{font-size:10px;color:var(--muted);margin:0}
#role-skip{font-size:12px;min-height:40px;border-bottom:1px solid var(--ink)}
.role-view-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:0 0 auto;min-height:38px;margin-block:3px}
.role-view-actions button{font-size:10px;line-height:1.5;padding:4px 0;min-height:27px}
#toggle-roles{display:inline-flex;align-items:center;justify-content:center;gap:7px;color:#fff;background:var(--coral);border:1px solid var(--coral);border-radius:2px;padding:7px 12px;font-size:12px;font-weight:600;min-height:36px;flex-shrink:0}
#toggle-roles:hover{background:#873023;border-color:#873023}
#toggle-roles[aria-expanded=true]{background:var(--paper);color:var(--coral)}
.role-toggle-icon{font-size:16px;line-height:1}
.character-scene #role-guidance{height:auto;min-height:16px;flex:0 0 auto;font-size:10px;line-height:1.6;margin:5px 0 0;text-align:left;color:var(--muted)}
.character-scene #role-guidance[data-playing=true]{color:var(--coral)}
.characters.is-focused{grid-template-columns:minmax(90px,22%) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:18px}
.characters.is-focused .person-wrap{max-width:175px;width:100%;justify-self:center}
.role-focus-summary{min-width:0;align-self:center;padding-right:12px}
.role-focus-summary strong{display:block;font:600 18px/1.5 var(--serif)}
.role-focus-summary p{font-size:12px;line-height:1.75;color:var(--muted);margin:7px 0 0}
.role-focus-summary span{display:block;font-size:11px;margin-top:7px;color:var(--coral)}
.characters.is-focused .person-popover{left:0;right:auto;transform:none}
#characters .person-popover{pointer-events:none}
.character-scene:has(.is-focused) .disclaimer{text-align:left}
.character-scene:has(.is-focused) .risk-bridge{display:none}
#characters .person[aria-current=true]{border-bottom:1px solid var(--coral);background:linear-gradient(0deg,#a13c2f0c,transparent 65%)}
@media(max-width:1000px){.characters.is-focused .person{grid-template-rows:minmax(90px,1fr) 18px 14px}}
@media(min-width:801px) and (max-width:1000px) and (min-height:600px){.characters.is-focused .person{grid-template-rows:minmax(0,1fr) 16px 13px}.role-focus-summary strong{font-size:15px}.role-focus-summary p{font-size:10px}}
@media(max-width:650px){
 #role-dialog{padding:18px;width:calc(100% - 24px);max-height:calc(100svh - 24px)}
 #role-dialog .dialog-head{padding-bottom:12px;margin-bottom:10px}
 #role-title{font-size:23px}.role-intro{font-size:12px;margin-bottom:12px}
 .role-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .role-choice{padding:6px 4px 9px}.role-choice-art{height:72px;width:80px}
 .role-choice strong{font-size:15px}.role-choice>span:last-child{font-size:10px}
 .role-entry-foot{margin-top:10px}.role-entry-foot p{font-size:9px}
 .role-view-actions{gap:12px;min-height:40px}.role-view-actions button{min-height:32px;font-size:10px}
 #toggle-roles{min-height:40px;font-size:12px;padding:8px 11px}
 .character-scene #role-guidance{font-size:10px;line-height:1.6;margin-top:4px;min-height:16px}
 .characters.is-focused{grid-template-columns:minmax(94px,36%) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px}
 .characters.is-focused .person{grid-template-rows:minmax(0,1fr) 17px 12px}
 .role-focus-summary{padding-right:0}.role-focus-summary strong{font-size:16px}.role-focus-summary p{font-size:11px;line-height:1.6;margin-top:5px}.role-focus-summary span{font-size:10px;margin-top:5px}
 .character-scene .disclaimer{font-size:8px}
 .front-page:has(.characters:not(.is-focused)){height:auto}
 .workspace:has(.characters:not(.is-focused)){height:auto;grid-template-rows:39px 220px auto}
 .characters:not(.is-focused){grid-template-rows:repeat(2,125px);flex:0 0 auto}
}
@media(max-width:365px){.role-focus-summary strong{font-size:14px}.role-focus-summary p{font-size:10px}.role-entry-foot{gap:2px}}
@media(prefers-reduced-motion:reduce){.role-choice{transition:none}}
