/* Compact mobile details; desktop dialogs and the full-screen gallery stay intact. */
@media(max-width:1000px){
 .character-appearances:not(.is-gallery){width:min(640px,calc(100vw - 24px));max-height:min(560px,65dvh);height:auto;margin:auto}
 .character-appearances.is-trivia{width:min(620px,84vw);height:min(600px,64dvh);max-height:min(600px,64dvh)}
 .character-appearances:not(.is-gallery) .character-info-header{display:grid;grid-template-columns:44px 44px minmax(0,1fr) 44px clamp(48px,14vw,80px);grid-template-rows:auto auto auto;gap:6px;padding:12px 12px 10px;align-items:start;border-bottom:1px solid #345027}
 .character-appearances:not(.is-gallery) .character-info-toolbar,
 .character-appearances:not(.is-gallery) .character-info-arrows{display:contents}
 .character-appearances:not(.is-gallery) .character-info-toolbar .character-info-back{grid-column:1;grid-row:1;margin:0;width:44px;min-height:44px;padding:3px;font-size:1.05rem;line-height:1.15;white-space:normal;align-self:start;justify-self:start}
 .character-appearances:not(.is-gallery) #character-info-previous{grid-column:2;grid-row:1;justify-self:center}
 .character-appearances:not(.is-gallery) #character-info-next{grid-column:4;grid-row:1;justify-self:center}
 .character-appearances:not(.is-gallery) .character-info-arrows button{width:44px;min-width:44px;height:44px;min-height:44px;padding:2px;font-size:2rem;align-self:center}
 .character-appearances:not(.is-gallery) .character-info-name{grid-column:3;grid-row:1;margin:0;max-width:none;align-self:center;text-align:center;font-size:clamp(1.25rem,4.8vw,1.9rem);line-height:1.1;overflow-wrap:anywhere}
 .character-appearances:not(.is-gallery) .character-info-icon{grid-column:5;grid-row:1 / span 2;align-self:start;justify-self:end;width:100%;max-width:100%;height:auto;max-height:none}
 .character-appearances:not(.is-gallery):not(.is-trivia) .character-info-facts{grid-column:2 / span 3;grid-row:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;margin:0;font-size:.875rem;line-height:1.35;text-align:center}
 .character-appearances:not(.is-gallery) #character-info-voice{justify-content:center}
 .character-appearances:not(.is-gallery) .character-info-header h2{grid-column:1 / -1;grid-row:3;margin:8px 0 0;padding:0;border:0;text-align:left;font-size:1.4rem;line-height:1.15}
 .character-appearances.is-trivia .character-info-header{grid-template-rows:auto auto}
 .character-appearances.is-trivia .character-info-header h2{grid-column:2 / span 3;grid-row:2;text-align:center;margin:6px 0 0;font-size:1.5rem}
 .character-appearances:not(.is-gallery) .character-appearances-content{flex:1 1 auto;min-height:0;max-height:none;padding:12px 16px 18px;overflow-y:auto;overscroll-behavior:contain}
 .character-appearances:not(.is-gallery):not(.is-trivia) .character-appearances-content h3{font-size:1.55rem;margin-bottom:8px}
 .character-appearances:not(.is-gallery):not(.is-trivia) .character-appearances-content li{font-size:.9375rem;line-height:1.6;padding:5px 0}
 .character-appearances.is-trivia .character-trivia-list li{font-size:.9375rem;line-height:1.65;padding:13px 2px 13px 4px}
 .character-appearances.is-trivia .character-trivia-empty{min-height:100px;padding:12px 0}
}
@media(max-width:420px){
 .character-appearances.is-trivia{width:calc(100vw - 24px)}
 .character-appearances:not(.is-gallery) .character-info-header{padding:10px 8px;gap:4px}
}
@media(max-width:1000px) and (max-height:500px){
 .character-appearances:not(.is-gallery){max-height:calc(100dvh - 24px)}
 .character-appearances.is-trivia{height:calc(100dvh - 24px)}
}
