#shomrei-language-picker{box-sizing:border-box;width:min(90vw,400px);max-height:90dvh;padding:22px;border:2px solid #f2d78e;border-radius:22px;background:#073a4b;color:#fff5d6;text-align:center;font:18px/1.5 Arial;z-index:2147483647}
#shomrei-language-picker::backdrop{background:#001923e8}
#shomrei-language-picker button{display:block;width:100%;min-height:48px;margin:10px 0;border:1px solid #f4db98;border-radius:12px;background:#f2d78e;color:#123642;font:bold 18px Arial}
#shomrei-language-button{position:fixed;top:8px;left:8px;z-index:2147483647;min-height:36px;border:1px solid #f2d78e;border-radius:10px;background:#073a4b;color:#fff5d6;padding:4px 9px;font:bold 12px Arial}
html[lang=ru] :is(#v270-age,#v438-profile,#toast,#v26-dialog,#w561-bonus,#v2525-save-dialog,#journey-panel,#w578-help,#heart-letter-v257){direction:ltr!important}
html[lang=ru] #menu:not(.hide)::before{content:'Выберите команду'!important}
html[lang=ru] :is(button,p,h1,h2,h3,label,legend,strong,small){unicode-bidi:plaintext}
html[lang=ru] #v270-ages button{text-align:left!important;align-items:flex-start!important}
html[lang=ru] #v438-name{direction:ltr!important}
html[lang=ru] #v438-clock{font-size:10px!important;line-height:13px!important;white-space:normal!important}
.r949-badge{position:absolute!important;bottom:18%!important;right:2px!important;width:31%!important;height:34%!important;object-fit:contain!important;z-index:9!important;pointer-events:none!important;filter:drop-shadow(0 2px 2px #0008);border-radius:8px!important}
#r949-catalog-link{display:block;max-width:400px;margin:12px auto;padding:14px 20px;background:#f7d782;color:#102f3e;border-radius:14px;text-align:center;text-decoration:none;font:bold 16px Arial}
#r949-shield-info{min-height:40px!important;padding:7px 14px!important;background:#ebc976!important;color:#16343c!important;border-radius:12px!important;border:1px solid #fff1bb!important;font:14px Arial!important}
.r949-dialog{max-width:min(92vw,480px);width:100%;max-height:88dvh;box-sizing:border-box;overflow:auto;background:#082c40;color:#fff6df;border:2px solid #d5ad5b;border-radius:20px;padding:18px;font:16px/1.5 Arial;z-index:2147483647;text-align:start}
.r949-dialog::backdrop{background:#011523d9}.r949-dialog .shield{width:120px;height:140px;object-fit:contain;float:inline-end;margin:0 12px 12px}.r949-dialog h2{font-size:22px}.r949-dialog button{min-height:44px;padding:10px 16px;border-radius:12px;background:#f2d087;color:#082c40;border:0;font:bold 16px Arial;margin:8px 4px}.r949-dialog small{display:block;color:#b7d4d9}

/* R949: long letters scroll from their heading to the final signature. */
html body #v26-dialog.v2529-letter{height:100vh!important;height:100dvh!important;overflow:hidden!important;align-items:stretch!important;padding:0!important}
html body #v26-dialog.v2529-letter .v26-box{display:block!important;height:100%!important;max-height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;touch-action:pan-y;box-sizing:border-box!important;padding:20px max(18px,calc((100vw - 680px)/2)) max(30px,env(safe-area-inset-bottom))!important;scrollbar-gutter:stable}
html body #v26-dialog.v2529-letter .v26-hero{position:static!important;display:block!important;width:100%!important;height:clamp(180px,33dvh,300px)!important;min-height:180px!important;max-height:300px!important;object-fit:contain!important;margin:0 auto 18px!important}
html body #v26-dialog.v2529-letter h2{line-height:1.35!important;margin:12px 0 18px!important}
html body #v26-dialog.v2529-letter p{white-space:pre-line!important;font-size:clamp(20px,4.8vw,24px)!important;line-height:1.75!important;text-align:start!important;margin:16px 0!important;max-height:none!important;overflow:visible!important;color:#fff6dc!important}
html body #v26-dialog.v2529-letter .r949-letter-status{font-size:15px!important;line-height:1.5!important;min-height:23px!important}
html body #v26-dialog.v2529-letter button{display:block!important;width:100%!important;min-height:50px!important;margin:10px 0!important;white-space:normal!important}
html body #heart-letter-v257 .heart-scroll{display:block!important;overflow-y:auto!important;max-height:100%!important;touch-action:pan-y}
html body #heart-letter-v257 .review-letter-hero{height:200px!important;min-height:140px!important}
html body #heart-letter-v257 p{margin:14px 0!important;line-height:1.65!important}
html body #v4-heart-modal{overflow-y:auto!important;align-items:flex-start!important;padding:18px!important}
html body #v4-heart-paper{max-height:none!important;overflow:visible!important;margin:0 auto!important}

html body #v26-dialog.v2529-letter .r949-letter-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;border-block:1px solid #e9ca7b66;padding:6px 0}
html body #v26-dialog.v2529-letter .r949-letter-controls button{font-size:16px!important;margin:0!important}
html body #v26-dialog.v2529-letter .r949-letter-status{grid-column:1/-1;margin:0!important}
html body #v4-heart-paper .r949-replay-art{display:block;width:100%;height:240px;object-fit:contain;margin:0 auto 16px}
html body #v4-heart-paper p{font:20px/1.75 Arial,sans-serif!important;max-width:none!important;white-space:pre-line!important;text-align:start!important}
html body #v4-heart-paper .r949-replay-status{font-size:14px!important;min-height:24px}
html body #v4-heart-paper .r949-replay-hearts{font-size:28px;white-space:nowrap;margin:18px auto}

html body #v26-dialog.v2529-letter .v26-box{
 position:relative!important;display:flex!important;flex-direction:column;
 justify-content:safe flex-end;padding:clamp(14px,3vw,32px)!important;
 background:linear-gradient(0deg,#041925 0%,#041925ee 27%,transparent 68%)!important;
}
html body #v26-dialog.v2529-letter::before{
 background-image:var(--letter-art)!important;background-size:cover!important;
 background-position:center 38%!important;filter:none;opacity:1;
}
html body #v26-dialog.v2529-letter .v26-hero{
 position:absolute!important;inset:0 0 auto!important;z-index:-1;pointer-events:none;
 width:100%!important;height:100%!important;min-height:0!important;
 max-height:none!important;object-fit:contain!important;object-position:center top!important;
 margin:0!important;
}
html body #v26-dialog.v2529-letter .v26-box{isolation:isolate;background:none!important}
html body #v26-dialog.v2529-letter .v26-box::before{
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:linear-gradient(0deg,#041925 0%,#041925e8 24%,transparent 63%);
}
html body #v26-dialog.v2529-letter .v26-box > :not(.v26-hero){
 width:min(100%,620px)!important;align-self:center;flex:none;text-align:center!important;
}
html body #v26-dialog.v2529-letter h2{font-size:clamp(22px,3vw,34px)!important;margin:0!important}
html body #v26-dialog.v2529-letter .r949-letter-body{font-size:clamp(16px,2vw,21px)!important;line-height:1.35!important;margin:4px 0 8px!important}
html body #v26-dialog.v2529-letter .v2529-gifts img{width:26px!important;height:26px!important;object-fit:contain}
html body #v26-dialog.v2529-letter .r949-letter-status:empty{display:none}
html body #v26-dialog.v2529-letter .r949-letter-controls{order:3;border:0;padding:0}
html body #v26-dialog.v2529-letter button{min-height:40px!important}


/* Medium portraits are image elements, separate from the legacy icon backgrounds. */
html body #app #menu#menu #v2-selection-panel #heroes#heroes .face[data-roster-tier="1"] {
 isolation:isolate;
 background:#092a39!important;
}
html body #app #menu#menu #v2-selection-panel #heroes#heroes .face[data-roster-tier="1"]>.medium-hero-picture {
 position:absolute!important;inset:0 0 auto!important;display:block!important;
 width:100%!important;height:calc(100% - 25px)!important;max-height:none!important;
 padding:0!important;margin:0!important;object-fit:contain!important;object-position:center!important;
 z-index:2!important;opacity:1!important;visibility:visible!important;pointer-events:none!important;
}
html body #app #menu#menu #v2-selection-panel #heroes#heroes .face[data-roster-tier="1"]>.w545-label {
 position:absolute!important;inset:auto 0 0!important;width:100%!important;
 z-index:3!important;background:#073040!important;
}
