/* Shared mobile-first layout. Wider columns are enhancements to this base. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;overflow-wrap:anywhere}
h1,h2,h3,p,li,blockquote{overflow-wrap:anywhere}
img,svg,video{max-width:100%}
.header-inner,main,.footer{padding-left:1rem;padding-right:1rem;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}
.header-inner{padding-top:max(1rem,env(safe-area-inset-top));align-items:center}
.footer{padding-bottom:max(1.375rem,env(safe-area-inset-bottom))}
main,.header-inner,.footer>div,.footer>p{width:100%;max-width:1280px;min-width:0}
.header-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%;margin-left:0}
.header nav{width:100%;min-width:0;margin:0;flex-wrap:wrap;justify-content:flex-start}
.header nav a{min-width:44px;justify-content:center}
.site-switch,.settings-button{width:100%;margin:0}
.primary,.choice,.site-switch,.settings-button,.text-button{min-width:0;max-width:100%;overflow-wrap:anywhere}
.choice>span:last-child,.settings-heading>h2{min-width:0}
.dialog-close{flex-shrink:0}
.home-intro h1,.paired-picker>h1{font-size:clamp(2rem,6vw,4rem)}
.paired-entry,.paired-catalog,.game-grid,.summary-grid,.scenarios,.role-results,.progress-situations,.recap-comparison,.role-picker{
 display:grid;grid-template-columns:minmax(0,1fr)
}
.paired-entry>*,.game-grid>*,.summary-grid>*,.scenarios>*,.role-picker>*{min-width:0}
.role-scores{grid-template-columns:minmax(0,1fr)}
.role-score{display:flex;flex-direction:column;align-items:flex-start}
.perspective-bar,.legacy-perspective{flex-direction:column;align-items:stretch}
.perspective-toggle,.legacy-perspective .primary{width:100%;flex-shrink:1}
.paired-stage-footer{flex-direction:column;align-items:stretch}
.session-return{display:block}
.session-return a{display:inline-flex;margin-top:.5rem}
.story,.info-block,.paired-recap .summary-item{padding:clamp(1.125rem,3vw,1.875rem)}
.settings-dialog:not([open]){display:none}
.settings-dialog{
 width:calc(100% - 2rem);max-width:40rem;min-width:0;
 max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);
 margin:auto;overflow:auto;overscroll-behavior:contain
}
.settings-content{padding:1.25rem;min-width:0;overflow-wrap:anywhere}
.settings-actions{display:grid;grid-template-columns:minmax(0,1fr)}
.settings-actions .primary{width:100%}
.settings-dialog[data-dialog-fallback][open]{display:block;position:fixed;z-index:1001;top:1rem;right:0;bottom:auto;left:0;margin:0 auto}
.dialog-backdrop{position:fixed;inset:0;z-index:1000;background:#142c4170}
.dialog-open{overflow:hidden}
a:focus,button:focus,summary:focus,select:focus,input:focus{outline:3px solid var(--focus);outline-offset:4px}
a:focus:not(:focus-visible),button:focus:not(:focus-visible),summary:focus:not(:focus-visible),select:focus:not(:focus-visible),input:focus:not(:focus-visible){outline:none;box-shadow:none}

/* One shared grid cell keeps each real control centred over its image.
   The control stays in flow, so enlarged or translated text can grow. */
.paired-entry.paired-entry-visual{display:block;padding:0;background:none;border:0;box-shadow:none}
.paired-entry-visual>div:first-child{margin-bottom:1rem}
.paired-entry-visual>.text-button{display:inline-flex;margin-top:1rem}
.perspective-heroes{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
.perspective-hero{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;isolation:isolate;border-radius:1rem;background:var(--tone-pale)}
.perspective-hero>img{grid-area:1/1;display:block;width:100%;height:100%;min-height:12rem;aspect-ratio:1672/941;object-fit:cover;border-radius:inherit}
.perspective-hero-button.primary{
 grid-area:1/1;z-index:1;align-self:start;justify-self:center;
 width:fit-content;max-width:calc(100% - 2rem);min-width:44px;min-height:48px;
 margin:clamp(.75rem,2vw,1.25rem) 1rem 1rem;padding:.6em 1.1em;
 border:2px solid #fff;border-radius:999px;background:var(--tone-deep);color:#fff;
 font-size:1rem;line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;
 box-shadow:0 2px 10px #10282e30;transition:box-shadow .15s ease
}
.perspective-hero-button.primary:hover{background:var(--tone-deep);color:#fff;text-decoration:underline;text-underline-offset:.2em;box-shadow:0 3px 14px #10282e50;transform:none}
.perspective-hero-button.primary:focus{outline:3px solid var(--focus);outline-offset:3px}
.perspective-hero-button.primary:focus:not(:focus-visible){outline:none}
@media(min-width:56.25rem){.perspective-heroes{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}}
@media(prefers-reduced-motion:reduce){.perspective-hero-button.primary{transition:none}}
.motion-reduce .perspective-hero-button.primary{transition:none}
@media(forced-colors:active){.perspective-hero-button.primary,.perspective-hero-button.primary:hover{background:Canvas;color:LinkText;border-color:LinkText;box-shadow:none}}

@media(min-width:24rem){.role-scores{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:41.25rem){
 .header-inner,main,.footer{padding-left:1.75rem;padding-right:1.75rem;padding-left:max(1.75rem,env(safe-area-inset-left));padding-right:max(1.75rem,env(safe-area-inset-right))}
 .header-actions{display:flex;width:auto;margin-left:auto}
 .site-switch,.settings-button{width:auto}
 .paired-entry,.paired-catalog,.scenarios,.role-picker,.role-results{grid-template-columns:repeat(2,minmax(0,1fr))}
 .perspective-bar,.legacy-perspective{flex-direction:row;align-items:center;flex-wrap:wrap}
 .perspective-toggle,.legacy-perspective .primary{width:auto}
 .paired-stage-footer{flex-direction:row;align-items:center}
 .session-return{display:flex;flex-wrap:wrap}
 .session-return a{margin-top:0}
 .settings-content{padding:1.75rem}
 .settings-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:56.25rem){
 .game-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.12fr)}
 .summary-grid{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
 .paired-recap .recap-comparison,.progress-situations{grid-template-columns:repeat(2,minmax(0,1fr))}
 .scenarios{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(forced-colors:active){.dialog-backdrop{background:Canvas;opacity:.8}.settings-dialog{border:2px solid CanvasText}}
@media print{.dialog-backdrop{display:none!important}.dialog-open{overflow:visible}.summary-grid,.paired-recap .recap-comparison{display:block}}
/* Character artwork is a single local sprite sheet; names and controls remain HTML. */
.character-picker{padding:clamp(1rem,3vw,1.5rem);margin:1.5rem 0;border:1px solid var(--tone-line);border-radius:1.25rem;background:var(--tone-pale);min-width:0}
.character-picker-heading{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.character-picker-heading h2{font-size:clamp(1.35rem,3vw,1.75rem);line-height:1.3;margin:0 0 .5rem}
.character-picker-heading p,.character-help{font-size:1rem;margin:0;max-width:65ch}
.character-picker-heading>div{flex:1 1 18rem;min-width:0}
.character-picker-heading>.primary{flex:none}
.character-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.character-option{display:flex;flex-direction:column;align-items:center;justify-content:start;gap:.35rem;min-width:0;min-height:48px;padding:.65rem .4rem;border:3px solid transparent;border-radius:1rem;background:#fff;color:var(--ink);font:inherit;text-align:center;cursor:pointer;overflow-wrap:anywhere;box-shadow:0 1px 3px #20394118}
.character-option:hover{border-color:var(--tone-line)}
.character-option[aria-pressed="true"]{border-color:var(--tone-deep);box-shadow:0 0 0 1px var(--tone-deep)}
.character-option:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.character-option>strong{font-size:1rem;line-height:1.4}
.character-selected{font-size:.875rem;line-height:1.4;min-height:1.4em;color:var(--tone-deep);font-weight:700}
.character-help{margin-top:1rem}
.character-image{position:relative;display:block;overflow:hidden;width:7rem;max-width:100%;flex:none;border-radius:.75rem;background:#fff}
.character-image::before{content:"";display:block;padding-top:100%}
.character-image>img{position:absolute;display:block;width:600%;height:300%;max-width:none;margin:0;pointer-events:none}
.character-option>.character-image{width:100%;max-width:8rem}
.encounter-cast{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:0 0 1.25rem}
.cast-character{display:flex;flex-direction:column;align-items:center;gap:.5rem;min-width:0;padding:.75rem;border:1px solid var(--tone-line);border-radius:1rem;background:var(--tone-pale);text-align:center}
.cast-character.is-you{border-top:4px solid var(--tone-deep);padding-top:calc(.75rem - 3px)}
.cast-character>div{display:flex;flex-direction:column;gap:.25rem;min-width:0;overflow-wrap:anywhere}
.cast-label{font-size:.875rem;font-weight:700;color:var(--tone-deep)}
.cast-character strong{font-size:1.2rem;line-height:1.35;color:var(--ink)}
.perspective-bar>.character-actions{display:flex;flex-direction:column;gap:.75rem;align-items:stretch;min-width:0}
.character-actions .primary{min-height:48px;white-space:normal;overflow-wrap:anywhere}
@media(min-width:30rem){.character-options{grid-template-columns:repeat(3,minmax(0,1fr))}.cast-character{flex-direction:row;text-align:left;gap:1rem}}
@media(min-width:56.25rem){.character-options{grid-template-columns:repeat(5,minmax(0,1fr))}.perspective-bar>.character-actions{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;max-width:65%}.cast-character>.character-image{width:8rem}}
@media(forced-colors:active){.character-picker,.cast-character{background:Canvas;color:CanvasText;border-color:CanvasText}.character-option{background:ButtonFace;color:ButtonText;border-color:ButtonText;box-shadow:none}.character-option[aria-pressed="true"]{outline:3px solid Highlight;outline-offset:-3px;box-shadow:none}.character-selected,.cast-label,.cast-character strong{color:CanvasText}.cast-character.is-you{border-top-color:Highlight}}
/* Keep the first action and the current decision ahead of optional detail. */
.clear-intro{margin-bottom:1.5rem}
.clear-intro h1{font-size:clamp(2rem,4vw,3rem);margin-bottom:.65rem;line-height:1.12}
.clear-intro .purpose-lead{font-size:clamp(1.25rem,2.5vw,1.6rem);font-weight:700;margin-bottom:.6rem;color:var(--deep)}
.clear-intro>p{max-width:65ch;margin-bottom:.65rem}
.clear-intro>.eyebrow{font-size:.8rem}
.paired-entry-visual{margin-bottom:1.5rem}
.perspective-entry{min-width:0}
.perspective-entry>p{margin:.75rem .25rem 0;font-size:1rem;max-width:45ch}
.how-to-play{padding:1.25rem 0;border-top:1px solid var(--line);margin-bottom:1rem}
.how-to-play h2{font-size:1.4rem;margin-bottom:1rem}
.how-to-play ol{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;padding-left:1.5rem;margin:0 0 1rem}
.how-to-play li{padding-left:.25rem}
.how-to-play li::marker{font-weight:800;color:var(--deep)}
.how-to-play strong,.how-to-play li span{display:block;font-size:1rem}
.simple-setup>h1{font-size:clamp(1.8rem,4vw,2.8rem);margin-bottom:.7rem}
.simple-setup>.page-lead{margin-bottom:1rem;max-width:60ch}
.simple-setup>.role-picker{margin:1.25rem 0}
.start-panel{max-width:56rem;border:1px solid var(--line);border-radius:1.25rem;background:#fff;padding:clamp(1rem,3vw,1.5rem)}
.setup-character{display:flex;align-items:center;gap:1rem;padding-bottom:1rem;border-bottom:1px solid var(--line);min-width:0}
.setup-character>.character-image{width:4.5rem}
.setup-character>div{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;min-width:0}
.setup-character strong{font-size:1.1rem}
.setup-character .text-button{font-size:.875rem;text-align:left}
.recommended-situation{padding-top:1.25rem}
.recommended-situation .eyebrow{font-size:.8rem;margin-bottom:.35rem}
.recommended-situation h2{font-size:clamp(1.4rem,3vw,1.8rem);line-height:1.3;margin-bottom:.65rem}
.recommended-situation p{max-width:48ch;margin-bottom:1rem}
.recommended-situation>.primary{min-height:48px;width:100%;margin-bottom:.75rem}
.recommended-situation>.small-note{margin-bottom:0;font-size:.875rem}
.scenario-library,.play-help{max-width:56rem;margin:1.25rem 0;padding:1rem;border:1px solid var(--line);border-radius:1rem;background:#fff}
.scenario-library>summary,.play-help>summary{min-height:44px;padding:.4rem 0;font-weight:700;color:var(--deep);cursor:pointer;overflow-wrap:anywhere}
.scenario-library[open]>summary,.play-help[open]>summary{margin-bottom:1rem}
.scenario-library>.paired-catalog{margin-top:1rem}
.scenario-library .encounter-card{padding:1.25rem}
.simple-setup>.session-return{max-width:56rem;margin-top:1rem}
.play-toolbar.perspective-bar{padding:.75rem 1rem;margin-bottom:.5rem;background:transparent;border:0;border-radius:0;border-bottom:1px solid var(--line);gap:.75rem}
.play-toolbar.perspective-bar .eyebrow{font-size:.875rem}
.play-toolbar.perspective-bar>.character-actions{flex-direction:row;flex-wrap:wrap;max-width:100%;gap:.5rem}
.play-toolbar .primary{font-size:.875rem;padding:.5rem .75rem;min-height:48px;flex:1 1 auto;width:auto}
.play-toolbar .perspective-toggle{flex-shrink:1}
.play-toolbar~.encounter-cast{gap:.75rem;margin-bottom:1rem}
.play-toolbar~.encounter-cast .cast-character{flex-direction:row;text-align:left;padding:.25rem .5rem;gap:.5rem;background:transparent;border:0;border-radius:0}
.play-toolbar~.encounter-cast .character-image{width:3.25rem}
.play-toolbar~.encounter-cast .cast-character strong{font-size:.95rem}
.play-toolbar~.encounter-cast .cast-label{font-size:.8rem}
.paired-game{margin-top:.75rem;gap:1.25rem}
.paired-game .story{padding:clamp(1.25rem,3vw,1.75rem)}
.paired-game .story h1{font-size:clamp(1.75rem,3.5vw,2.4rem);line-height:1.2}
.paired-game .story-text{font-size:1.05rem;line-height:1.7}
.paired-game .prompt{margin-bottom:1rem}
.paired-game .prompt h2{font-size:clamp(1.35rem,2.5vw,1.75rem);line-height:1.35}
.paired-game .prompt>p:last-child{font-size:.95rem}
.paired-feedback-actions{margin-top:1.25rem;margin-bottom:1rem}
.paired-game .source-details{margin-top:1rem}
.play-help{max-width:none;margin-top:1.5rem}
.play-help p{font-size:.95rem;max-width:68ch}
@media(min-width:48rem){.how-to-play ol{grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem}.recommended-situation>.primary{width:auto;min-width:14rem}.play-toolbar.perspective-bar{flex-direction:row;align-items:center}}
@media(forced-colors:active){.start-panel,.scenario-library,.play-help{background:Canvas;border-color:CanvasText}.clear-intro .purpose-lead,.scenario-library>summary,.play-help>summary{color:CanvasText}}
