/* Number-only reaction controls and the shared light/dark bottom sheet. */
.nd-reaction-controls { display: inline-flex; align-items: center; vertical-align: middle; }
.nd-card .nd-reaction-controls .nd-icon-button { min-height: 40px; }
.nd-card .nd-reaction-count,
.nd-card .nd-reaction-count:is(:hover, :focus, :active) {
    min-width: 28px;
    margin: 0;
    padding: 5px 7px;
    background: transparent;
    color: var(--nd-muted);
    border: 0;
    box-shadow: none;
    cursor: pointer;
}
.nd-card .nd-reaction-count:hover { color: var(--nd-purple); }
.nd-card .nd-reaction-count:focus-visible { outline: 2px solid var(--nd-purple); outline-offset: 1px; }
html.nr-modal-open, html.nr-modal-open body { overflow: hidden; }
dialog.nr-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px 6px max(12px, env(safe-area-inset-bottom));
    border: 0;
    background: transparent;
    color: var(--nd-text);
    overflow: hidden;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
}
.nr-dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
.nr-dialog::backdrop { background: rgb(22 12 38 / 48%); opacity: 0; transition: opacity .22s ease; }
.nr-dialog.is-open::backdrop { opacity: 1; }
html[data-na-theme="dark"] .nr-dialog::backdrop { background: rgb(0 0 0 / 64%); }
.nr-dialog *, .nr-dialog *::before { box-sizing: border-box; }
.nr-dialog [hidden] { display: none !important; }
.nr-panel {
    width: min(100%, 440px);
    max-height: min(78vh, 620px);
    max-height: min(78dvh, 620px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nd-line);
    border-radius: 20px;
    background: var(--nd-card);
    overflow: hidden;
    transform: translateY(calc(100% + 24px));
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.nr-header h2 {
    text-transform: unset;
}
.nr-dialog.is-open .nr-panel { transform: translateY(0); }
.nr-handle { width: 38px; height: 4px; flex-shrink: 0; border-radius: 4px; background: var(--nd-muted); opacity: .65; margin: 9px auto 4px; }
.nr-header { position: relative; flex-shrink: 0; margin: 0 18px; padding: 10px 42px 13px 0; border-bottom: 1px solid var(--nd-line); }
.nr-header h2 { margin: 0; color: var(--nd-purple); font: 700 18px/1.35 Inter, Arial, sans-serif; }
.nr-count { margin: 2px 0 0; color: var(--nd-muted); font-size: 12px; line-height: 1.5; }
.nr-dialog button { font-family: inherit; cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none; }
.nr-dialog .nr-close {
    position: absolute; right: -8px; top: 2px; display: grid; place-items: center;
    width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--nd-purple);
}
.nr-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nr-dialog .nr-close:hover { background: var(--nd-primary); color: #211631; }
.nr-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px; scrollbar-width: thin; scrollbar-color: var(--nd-muted) transparent; }
.nr-dialog .nr-members { list-style: none; margin: 0; padding: 0; }
.nr-members > li { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--nd-line); }
.nr-members > li:last-child { border-bottom: 0; }
.nr-member-enter { animation: nr-member-enter .2s ease-out backwards; animation-delay: var(--nr-row-delay, 0ms); }
@keyframes nr-member-enter { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.nr-loading > div { display: flex; align-items: center; gap: 13px; height: 66px; padding: 10px 2px; border-bottom: 1px solid var(--nd-line); }
.nr-loading > div:last-child { border-bottom: 0; }
.nr-loading > div::before { content: ''; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: var(--nd-soft); }
.nr-loading > div::after { content: ''; width: 110px; height: 10px; border-radius: 5px; background: var(--nd-soft); }
.nr-loading > div:nth-child(even)::after { width: 82px; }
.nr-panel.is-loading .nr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.nr-dialog .nr-member {
    display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 10px 2px;
    text-decoration: none; color: var(--nd-text); border-radius: 6px;
}
.nr-dialog .nr-member:hover { background: var(--nd-soft); color: var(--nd-purple); }
.nr-dialog .nr-member.is-opening { background: var(--nd-soft); color: var(--nd-purple); cursor: progress; }
.nr-member.is-opening::after { content: ''; margin-left: auto; flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid var(--nd-line); border-top-color: var(--nd-primary); border-right-color: var(--nd-purple); border-radius: 50%; animation: nr-profile-spin .7s linear infinite; }
@keyframes nr-profile-spin { to { transform: rotate(360deg); } }
.nr-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.45; }
.nr-avatar { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border-radius: 50%; }
.nr-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nr-avatar .na-avatar-placeholder { font-size: 18px; font-weight: 700; }
.nr-status { margin: 22px 0; text-align: center; color: var(--nd-muted); font-size: 14px; line-height: 1.5; }
.nr-dialog .nr-action { display: block; margin: 12px auto; padding: 9px 18px; border: 1px solid var(--nd-line); border-radius: 8px; background: var(--nd-soft); color: var(--nd-purple); font-size: 13px; font-weight: 600; }
.nr-dialog .nr-action:hover { background: var(--nd-primary); color: #211631; }
.nr-dialog .nr-action:disabled { opacity: .6; cursor: wait; }
.nr-dialog :is(button, a):focus-visible { outline: 2px solid var(--nd-purple); outline-offset: -2px; }
.nr-footer { flex-shrink: 0; border-top: 1px solid var(--nd-line); margin: 0 18px; padding: 14px 0 16px; text-align: center; color: var(--nd-muted); font-size: 11px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
    .nr-panel, .nr-dialog::backdrop { transition: none; }
    .nr-member-enter, .nr-member.is-opening::after { animation: none; }
}
