/* Play overlays share the feed palette, including member-selected dark mode. */
.np-dialog, .np-single { box-sizing: border-box; font-family: Inter, Arial, sans-serif; color: var(--nd-text); }
.np-dialog *, .np-single * { box-sizing: border-box; }
html body .np-dialog { position: fixed; inset: var(--np-visible-top, 0px) 0 auto; padding: 0; border: 1px solid var(--nd-line); border-radius: 14px; background: var(--nd-card); color: var(--nd-text); width: min(620px, calc(100% - 32px)); max-width: none; height: min(820px, calc(var(--np-visible-height, 100dvh) - 32px)); max-height: calc(var(--np-visible-height, 100dvh) - 32px); margin: max(16px, calc((var(--np-visible-height, 100dvh) - 820px) / 2)) auto 0; overflow: hidden; overscroll-behavior: contain; box-shadow: 0 24px 90px #0005; }
.np-dialog::backdrop { background: #211b32a6; }
html.np-modal-open { overflow: hidden; }
.np-dialog .np-toolbar { position: sticky; top: 0; height: 0; z-index: 4; }
.np-dialog .np-close { position: relative; top: 0; margin: 8px 8px 0 auto; display: block; z-index: 2; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--nd-primary); color: #000; font: 26px/1 Arial,sans-serif; cursor: pointer; }
.np-dialog .np-close:hover { background: #f0bf00; color: #000; }
/* Scrims and teammates use the same sliding shell and independent scrolling as tournaments. */
.np-dialog .np-drawer { display: contents; }
html body .np-dialog.np-drawer-dialog { position: fixed; inset: var(--np-visible-top, 0px) 0 auto; margin: 0; width: 100vw; height: var(--np-visible-height, 100dvh); max-height: none; border: 0; border-radius: 0; background: transparent; overflow: clip; scrollbar-gutter: auto; box-shadow: none; }
.np-drawer-dialog::backdrop { background: rgba(26, 20, 42, .68); opacity: 0; transition: opacity .28s ease; }
/* The header and reply bar stay outside the scrolling middle pane. */
.np-drawer-dialog .np-drawer { display: block; position: absolute; right: 0; top: 0; width: min(100%, 520px); height: 100%; overflow: clip; background: var(--nd-card); box-shadow: -15px 0 70px #1d0b2626; transform: translateX(100%); transition: transform .28s cubic-bezier(.22, .61, .36, 1); }
.np-drawer-dialog.np-open .np-drawer { transform: translateX(0); }
.np-drawer-dialog.np-open::backdrop { opacity: 1; }
.np-dialog [data-np-content] { height: 100%; overflow: hidden; }
.np-dialog .np-detail { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.np-dialog .np-heading { flex: 0 0 auto; max-height: 35%; overflow-y: auto; }
.np-dialog .np-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; overflow-anchor: none; }
.np-dialog .np-loading, .np-dialog .np-load-error { height: 100%; overflow-y: auto; }
.np-drawer-dialog .np-toolbar { position: absolute; top: 0; right: 0; }
.np-drawer-dialog .np-close { margin: 12px 14px 0 0; width: 44px; height: 44px; box-shadow: 0 2px 12px #25163712; }
.np-drawer-dialog .np-heading { padding-top: 36px; }
.np-detail { background: var(--nd-card); border-radius: inherit; overflow-wrap: anywhere; }
.np-heading { padding: 32px 30px 24px; border-bottom: 1px solid var(--nd-line); }
.np-heading .nd-category-badge { max-width: calc(100% - 38px); }
html body .np-detail h1 { margin: 20px 0 14px; color: var(--nd-text); font-family: inherit; font-size: 28px; font-weight: 750; line-height: 1.28; letter-spacing: -.65px; text-transform: none; }
.np-title-row { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0 14px; }
html body .np-detail .np-title-row h1 { flex: 0 1 auto; min-width: 0; margin: 0; }
.np-title-row:has(.np-author-games) h1 { max-width: 60%; }
html body .np-detail h2 { color: var(--nd-text); font: 700 17px/1.5 Inter,Arial,sans-serif; text-transform: none; letter-spacing: 0; margin: 0 0 18px; }
.np-schedule { margin: 0; color: var(--nd-muted); font-size: 12px; line-height: 1.8; }
.np-main { padding: 24px 30px 16px; }
.np-author-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 25px; }
.np-author { display: flex; gap: 12px; align-items: center; min-width: 0; text-decoration: none; color: var(--nd-text); }
.np-author strong { display: block; font-size: 14px; line-height: 1.5; }
.np-author small { display: block; font-size: 12px; color: var(--nd-muted); margin-top: 2px; }
.np-author-games { --np-game-text: #115e59; --np-game-border: #99f6e4; display: flex; flex: 1 1 0; min-width: 0; justify-content: flex-end; gap: 6px; padding-top: 2px; }
.np-author-game, .np-detail .np-author-games-toggle { flex: 0 0 auto; min-width: 0; height: 28px; padding: 4px 8px; border: 1px solid var(--np-game-border); border-radius: 6px; color: var(--np-game-text); background: transparent; font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.np-detail .np-author-games-toggle { flex: 0 0 auto; min-width: 30px; min-height: 28px; margin: 0; box-shadow: none; }
.np-detail .np-author-games-toggle:hover { border-color: var(--np-game-text); }
.np-detail .np-author-games-toggle:focus-visible { outline-color: var(--np-game-text); outline-offset: 2px; }
.np-author-games.is-expanded { flex-wrap: wrap; }
.np-author-games.is-expanded .np-author-game { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; }
html[data-na-theme="dark"] .np-author-games { --np-game-text: #99f6e4; --np-game-border: #2b6c64; }
.np-detail .nd-avatar { flex: 0 0 38px; width: 38px; height: 38px; }
.np-body { font-size: 15px; line-height: 1.85; color: var(--nd-muted); }
.np-body p { margin: 0 0 18px; }
.np-body a, .np-comment-body a { color: var(--nd-purple); text-decoration: underline; }
.np-conversation { scroll-margin-top: 64px; }
.np-detail img { max-width: 100%; height: auto; border-radius: 8px; }
.np-detail .nd-badges { margin: 20px 0 24px; }
.np-fields { display: grid; gap: 16px; margin: 22px 0; font-size: 13px; }
.np-fields dt { font-weight: 650; margin-bottom: 4px; }
.np-fields dd { margin: 0; color: var(--nd-muted); white-space: pre-wrap; }
.np-fields dd img { display: block; margin-top: 8px; }
.np-fields a { color: var(--nd-purple); }
.np-detail button { font-family: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; }
.np-detail button:disabled { opacity: .55; cursor: default; }
.np-request { margin: 24px 0 14px; }
.np-request .nd-primary { width: 100%; }
.np-introduction { padding: 20px; border: 1px solid var(--nd-line); border-radius: 9px; background: var(--nd-soft); }
.np-detail label { display: block; font-size: 13px; color: var(--nd-muted); line-height: 1.6; margin-bottom: 7px; }
html body .np-detail input[type="text"], html body .np-detail textarea { width: 100%; min-height: 48px; height: auto; border: 1px solid var(--nd-line) !important; border-radius: 8px; color: var(--nd-text); background: var(--nd-card); font: 400 16px/1.6 Inter,Arial,sans-serif; padding: 12px 13px; resize: vertical; box-shadow: none; }
.np-detail input::placeholder, .np-detail textarea::placeholder { color: var(--nd-muted); opacity: 1; }
.np-introduction .np-text-button { display: block; width: 100%; margin-top: 10px; text-align: center; }
.np-detail svg { width: 16px; height: 16px; flex: none; }
.np-conversation { border-top: 1px solid var(--nd-line); margin-top: 16px; padding-top: 16px; }
/* Keep the comment anchor without reserving space for an empty discussion. */
.np-conversation:not(:has([data-np-comment], [data-np-more]:not([hidden]), .np-help, a)) { border-top: 0; margin-top: 0; padding-top: 0; }
.np-main > .np-fields:last-of-type { margin-bottom: 16px; }
.np-comment { display: flex; gap: 10px; margin: 0 0 12px; scroll-margin: 60px; }
.np-comment .nd-avatar { flex-basis: 32px; width: 32px; height: 32px; }
.np-comment-content { min-width: 0; flex: 1; }
.np-child-replies { margin-top: 8px; padding-inline-start: 10px; border-inline-start: 2px solid var(--nd-line); }
.np-child-replies > [data-np-children] > .np-comment { margin-bottom: 14px; }
.np-child-replies .nd-avatar { flex-basis: 28px; width: 28px; height: 28px; }
.np-child-replies[hidden], .np-replies-toggle[hidden] { display: none; }
.np-comment-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; font-size: 13px; }
.np-comment-heading time { color: var(--nd-muted); font-size: 10px; }
.np-comment-body { font-size: 14px; line-height: 1.6; color: var(--nd-muted); }
.np-comment-body p { margin: 4px 0; }
.np-comment-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
.np-detail .np-text-button { background: transparent; color: var(--nd-purple); border: 0; padding: 5px 0; min-height: 30px; font-size: 12px; text-decoration: none; box-shadow: none; }
.np-reply-form { margin-top: 12px; }
.np-reply-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: 16px 30px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--nd-line); background: var(--nd-card); }
.np-reply-footer .nd-primary { display: flex; }
.np-reply-footer .np-reply-form { width: 100%; margin: 0; }
.np-dialog .np-reply-footer { max-height: 60%; overflow-y: auto; overscroll-behavior: contain; }
.np-reply-footer .na-mention-ui { margin-bottom: 0; }
.np-reply-submit { display: flex; justify-content: flex-end; margin-top: 10px; }
html body .np-detail .np-reply-form textarea { min-height: 50px; max-height: 240px; resize: none; overflow-y: hidden; }
.np-help { color: var(--nd-muted); font-size: 12px; line-height: 1.7; margin: 9px 0 14px; }
.np-error { font-size: 13px; color: #a92541; line-height: 1.7; }
html[data-na-theme="dark"] .np-error { color: #ffb0bf; }
.np-status, .np-request-result { border: 1px solid var(--nd-line); background: var(--nd-soft); padding: 14px; border-radius: 8px; font-size: 13px; line-height: 1.8; }
.np-request-result a { display: block; margin-top: 6px; color: var(--nd-purple); }
.np-loading, .np-load-error { padding: 54px 30px; min-height: 270px; font-size: 14px; color: var(--nd-muted); }
.np-loading::after { content: ''; display: block; margin-top: 24px; height: 120px; border-radius: 8px; background: var(--nd-soft); }
.np-single { max-width: 680px; margin: 0 auto; padding: 24px 20px 130px; }
.np-single .np-detail { border: 1px solid var(--nd-line); border-radius: 14px; }
.np-back { display: inline-block; margin-bottom: 20px; color: var(--nd-purple); text-decoration: none; font-size: 14px; }
.np-dialog [hidden], .np-single [hidden] { display: none !important; }
.np-dialog :focus-visible, .np-single :focus-visible { outline: 3px solid #f9c613; outline-offset: 3px; }
/* Jumping to the conversation should not outline the entire section. */
.np-dialog .np-conversation:focus, .np-single .np-conversation:focus { outline: none; }
@media (max-width: 600px) {
    html body .np-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 20px); border-radius: 10px; }
    .np-heading { padding: 30px 20px 22px; }
    .np-main { padding: 22px 20px 16px; }
    .np-reply-footer { padding-right: 20px; padding-left: 20px; }
    html body .np-detail h1 { font-size: 25px; }
    .np-introduction { padding: 18px; }
    .np-single { padding: 20px 12px 130px; }
}
@media (max-width: 782px) { .np-drawer-dialog .np-drawer { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .np-dialog *, .np-single *, .np-drawer-dialog::backdrop { scroll-behavior: auto !important; transition: none !important; } }
