/* Namespaced styles: does not alter the host site's colors or layout. */
.wan-top-link { position: relative; z-index: 5; padding: .4rem max(1rem, env(safe-area-inset-left)); text-align: right; font: inherit; line-height: 1.5; }
.wan-top-link a { color: inherit; font-size: .78rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; display: inline-block; padding: .35rem .5rem; border-radius: 999px; }
.wan-top-link a:hover { background: rgba(127,127,127,.12); }
.wan-top-link a:focus-visible, .wan-dialog button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.wan-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; padding: 0; width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); border: 1px solid rgba(255,255,255,.22); border-radius: 1.25rem; color: var(--notice-text, #f1efdf); background: var(--notice-surface, #24291f); box-shadow: 0 1.2rem 5rem rgba(0,0,0,.5); font: 1rem/1.65 system-ui, sans-serif; }
.wan-dialog[open] { display: flex; flex-direction: column; }
.wan-dialog::backdrop { background: rgba(0,0,0,.65); }
.wan-heading { display: flex; align-items: flex-start; gap: 1rem; flex: none; padding: 1.1rem 1.25rem .6rem; }
.wan-heading h2 { margin: 0; font: 600 1.15rem/1.4 system-ui, sans-serif; flex: 1; }
.wan-close { min-height: 44px; padding: .45rem .8rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.wan-content { overflow-y: auto; overscroll-behavior: contain; padding: 0 1.25rem 1.2rem; overflow-wrap: anywhere; }
.wan-content p { margin: .8rem 0; }
.wan-content h2 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.wan-document { margin: 0; background: #24291f; color: #f1efdf; font: 1rem/1.7 system-ui, sans-serif; }
.wan-document main { max-width: 46rem; padding: 2rem 1.25rem; margin: auto; }
.wan-document h1 { font-size: 1.7rem; line-height: 1.3; }
.wan-document h2 { font-size: 1.2rem; }
@media (forced-colors: active) { .wan-dialog, .wan-close { border: 1px solid CanvasText; } }

.wan-dialog:not([open]) { display: none; }
.wan-dialog .wan-content p { color: inherit; font: inherit; }
.wan-dialog .wan-content h2 { color: inherit; font: 600 1.1rem/1.4 system-ui, sans-serif; text-transform: none; letter-spacing: normal; }
.wan-dialog .wan-heading h2 { color: inherit; text-transform: none; letter-spacing: normal; }
