/* Keep an opaque canvas even while legacy engine styles are being replaced. */
html:is(.v4-loading,.v4-ready) {background:#fff!important;color-scheme:light!important;}
html.v4-loading body {visibility:hidden!important;opacity:0!important;pointer-events:none!important;background:#fff!important;}
html.v4-loading dialog::backdrop {opacity:0!important;}
html.v4-loading body.v2-booting::after {display:none!important;}
html.v4-loading :is(.v4-sidebar,#v4-main) {transition:none!important;}
html.v4-loading::after {content:"読み込んでいます…";position:fixed;inset:0;display:grid;place-items:center;color:#756e66;font:14px/1.6 system-ui,sans-serif;pointer-events:none;opacity:0;animation:v4-loading-note .15s .45s forwards;}
/* Fade the content only: the paper, header and menu must never dim. */
html.v4-ready #v4-main {animation:v4-page-enter .24s ease-out;}
@keyframes v4-page-enter {from{opacity:0}to{opacity:1}}
@keyframes v4-loading-note {to{opacity:1}}
.v4-page-load-error {box-sizing:border-box;max-width:560px;margin:15vh auto;padding:28px;color:#302d29;background:#fff;font:16px/1.8 system-ui,sans-serif;}
.v4-page-load-error h1 {font-size:24px;font-weight:500;}
.v4-page-load-error button,.v4-page-load-error a {display:inline-flex;align-items:center;min-height:44px;padding:8px 18px;margin:12px 12px 0 0;box-sizing:border-box;border:1px solid #af402d;border-radius:4px;background:#fff;color:#af402d;font:inherit;}
@media(prefers-reduced-motion:reduce) {html.v4-ready #v4-main{animation:none}html.v4-loading::after{animation:none;opacity:1}}
