.notification-preferences>p{max-width:760px}.notification-group{border-top:1px solid var(--line);padding:14px 0}.notification-group summary,.notification-summary summary{cursor:pointer;font-weight:650;color:var(--teal);padding:5px 0}.notification-channel-heading,.notification-event{display:grid;grid-template-columns:minmax(0,1fr) 95px 75px;gap:12px;align-items:center;padding:12px 6px}.notification-channel-heading{font-size:12px;color:var(--muted);border-bottom:1px solid var(--line)}.notification-event{border-bottom:1px solid var(--line);font-size:14px}.notification-event label,.notification-channel-heading>span:not(:first-child){text-align:center}.notification-event input{width:18px;height:18px;accent-color:var(--teal)}.notification-summary{border-top:1px solid var(--line);padding-top:16px;margin:10px 0 24px}.notification-summary>.field,.notification-summary>.check-field{margin-top:18px}.notification-thresholds{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:18px 0}@media(max-width:600px){.notification-channel-heading,.notification-event{grid-template-columns:minmax(0,1fr) 70px 48px;gap:6px;padding-left:0;padding-right:0}.notification-event{font-size:13px}.notification-thresholds{grid-template-columns:1fr}}


/* Floating page alerts: the existing scoped activity list opens above the bell. */
.context-updates-floating{--update-red:#c83e3c;--update-red-soft:#fee8e6}
/* Its toggle and panel are fixed; the in-flow container must not keep the panel frame. */
.context-updates.context-updates-floating{margin:0;padding:0;border:0;background:none;box-shadow:none}
:root[data-theme=dark] .context-updates-floating{--update-red:#ff8984;--update-red-soft:#4b2e30}
.context-updates-floating>.context-updates-toggle{position:fixed;z-index:45;right:max(24px,env(safe-area-inset-right));bottom:24px;display:grid;place-items:center;width:58px;height:58px;min-height:58px;padding:0;border:1px solid color-mix(in srgb,var(--update-red) 20%,var(--line));border-radius:var(--radius-circle,50%);background:var(--update-red-soft);color:var(--update-red);box-shadow:0 12px 30px #15272f40,0 3px 8px #15272f26;cursor:pointer;transition:box-shadow .15s ease,background .15s ease}
.context-updates-floating>.context-updates-toggle:hover,.context-updates-floating>.context-updates-toggle[aria-expanded=true]{background:color-mix(in srgb,var(--update-red) 20%,var(--surface));box-shadow:0 15px 38px #15272f4d,0 4px 10px #15272f33}
.context-updates-floating>.context-updates-toggle:focus-visible{outline:3px solid var(--teal);outline-offset:4px}
.context-updates-toggle>.icon,.context-updates-bell>.icon{width:26px;height:26px;fill:currentColor;stroke:currentColor;stroke-width:1.5}
.context-updates-floating .context-updates-count{position:absolute;right:-4px;top:-5px;display:grid;place-items:center;box-sizing:border-box;min-width:25px;height:25px;padding:0 5px;border:2px solid var(--surface);border-radius:var(--radius-large,16px);background:#c83e3c;color:#fff;font:700 11px/1 var(--font-body,Inter,sans-serif);font-variant-numeric:tabular-nums}
.context-updates-bell{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;border-radius:var(--radius-card,8px);background:var(--update-red-soft);color:var(--update-red)}
.context-updates-bell>.icon{width:22px;height:22px}
.context-updates-summary{display:flex;align-items:center;gap:8px;margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.context-updates-summary>.icon{width:18px;height:18px;flex:none;color:var(--teal)}
.context-updates-summary>span{min-width:0;overflow-wrap:anywhere}
.context-updates-offline{display:block;margin-top:6px;font-size:11px;color:var(--muted)}
.context-updates-mark-all{display:inline-flex;align-items:center;gap:8px;min-height:36px;font-size:12px;line-height:1.4;color:var(--teal);text-align:left}
.context-updates-mark-all>.icon{width:20px;height:20px;flex:none}
.context-update-popover{position:fixed;inset:auto;z-index:75;display:flex;flex-direction:column;box-sizing:border-box;min-width:0;max-width:calc(100vw - 24px);max-height:min(560px,calc(100dvh - 24px));margin:0;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card,8px);box-shadow:0 22px 60px #14252b40,0 6px 18px #14252b26;color:var(--ink);font:14px/1.5 var(--font-body,Inter,Arial,sans-serif);overflow:hidden}
.context-update-popover[hidden]{display:none!important}
@supports selector(:popover-open){.context-update-popover:not(:popover-open){display:none}}
.context-update-popover>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);flex:none}
.context-update-popover>header h2{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0;font:650 17px/1.4 var(--font-body,Inter,Arial,sans-serif);letter-spacing:0}
.context-update-popover>header>.icon-btn{width:30px;height:30px;min-height:30px;color:var(--muted)}
.context-update-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.context-update-list>.helper{padding:12px 20px}
.context-update-popover .context-update{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;padding:14px 0;border-top:0;border-bottom:1px solid var(--line)}
.context-update-popover .context-update:last-child{border-bottom:0}
.context-update-popover .context-update-icon{display:grid;place-items:center;position:relative;flex:none;width:36px;height:36px;margin-top:2px;border-radius:var(--radius-card,8px);background:var(--teal-soft);color:var(--teal)}
.context-update-popover .context-update-icon:after{content:"";position:absolute;right:-2px;top:-3px;width:9px;height:9px;border-radius:var(--radius-circle,50%);background:#ef3636;border:2px solid var(--surface)}
.context-update-popover .context-update-icon>.icon{width:22px;height:22px}
.context-update-popover .context-update-copy{display:grid;gap:3px;min-width:0;flex:1}
.context-update-popover .context-update-copy>h3{margin:0;font:650 14px/1.45 var(--font-body,Inter,Arial,sans-serif);overflow-wrap:anywhere}
.context-update-popover .context-update-open{display:block;width:100%;margin:0;padding:0;color:var(--ink);font:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere}
.context-update-popover .context-update-open:hover{color:var(--teal);text-decoration:underline;text-underline-offset:3px}
.context-update-popover .context-update{position:relative;isolation:isolate;border-radius:0;padding-left:20px;padding-right:20px;margin:0}
.context-update-popover .context-update:hover,.context-update-popover .context-update:focus-within{background:var(--teal-soft)}
.context-update-popover .context-update-open:after{content:"";position:absolute;inset:0;z-index:1;cursor:pointer}
.context-update-popover .context-update:has(.context-update-open:focus-visible){outline:2px solid var(--teal);outline-offset:-2px}
.context-update-popover .context-update-consult,.context-update-popover .context-update-invite :is(button,a,input,summary){position:relative;z-index:2}
.context-update-popover .context-update-copy>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;font-size:12px;line-height:1.45;color:var(--muted)}
.context-update-popover .context-update-copy>small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.context-update-popover .context-update-consult{width:28px;height:28px;min-width:28px;min-height:28px;color:var(--teal);flex:none;margin-top:1px}
.context-update-consult>.icon{width:19px;height:19px}
.context-update-invite{flex-basis:100%;min-width:0;padding-left:48px;font-size:12px}
.context-update-popover .context-update-actions{margin:8px 0 0;max-width:none}
.context-update-popover>footer{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;flex-wrap:wrap;padding:12px 20px;border-top:1px solid var(--line);flex:none}
.context-update-range{font-size:12px;color:var(--muted)}
.context-update-popover .context-update-pages{display:flex;align-items:center;gap:4px;margin:0;padding:0;border:0}
.context-update-popover .context-update-pages>.icon-btn{width:28px;height:28px;min-height:28px;min-width:28px}
.context-update-popover .context-update-pages>span{font-size:11px;white-space:nowrap}
.context-update-popover>footer .context-updates-mark-all{margin-left:auto}

.context-update-popover>header>div{min-width:0}
.context-update-popover>header h2{flex-wrap:nowrap;gap:9px;font-size:15px}
.context-update-popover>header>.icon-btn{flex:none;align-self:flex-start}
:root[data-theme=dark] .context-update-popover{box-shadow:0 24px 64px #0009,0 8px 22px #0006;border-color:color-mix(in srgb,var(--line) 75%,#fff)}
:root[data-theme=dark] .context-updates-floating>.context-updates-toggle{box-shadow:0 14px 36px #0009,0 4px 12px #0006}
@media(max-width:700px){
 .context-updates-floating>.context-updates-toggle{right:max(16px,env(safe-area-inset-right));bottom:calc(4px + env(safe-area-inset-bottom));width:44px;height:44px;min-height:44px}
 .context-update-popover>header,.context-update-popover>footer{padding:12px 14px}
 .context-update-list{padding:0}
 .context-update-popover>header h2{font-size:14px;gap:8px}
 .context-update-popover .context-update-copy{flex-basis:calc(100% - 90px)}
 .context-update-popover .context-update{gap:9px;padding-left:14px;padding-right:14px}
 .context-update-popover .context-update-copy>h3{font-size:13px}
 .context-update-invite{padding-left:45px}
 .context-update-popover>footer .context-updates-mark-all{width:100%;justify-content:flex-end}
}
@media(prefers-reduced-motion:reduce){.context-updates-floating>.context-updates-toggle{transition:none}}

@media(max-width:700px){
 .app-shell:has(.context-updates-floating) .bottom-nav{padding-right:76px}
 .app-shell:has(.context-updates-floating) .bottom-nav button{min-width:0;flex:1;padding-inline:2px}
}
