/* Uses the profile/menu palette, grouped rows and shared control radii. */
.notification-bell { position:relative; margin-left:auto; flex-shrink:0; }
.notification-bell svg { width:23px; height:23px; }
.notification-badge { position:absolute; right:0; top:0; min-width:16px; border-radius:12px; padding:1px 4px; background:var(--accent); color:var(--accent-ink); font-size:10px; }
#screen-notifications,#screen-notification-settings { overflow:hidden; background:var(--surface); }
#screen-notifications > .u-hdr,#screen-notification-settings > .u-hdr { width:100%; max-width:600px; margin:0 auto; padding-bottom:12px; }
.notification-body { width:100%; max-width:600px; min-height:0; margin:0 auto; padding:0 20px max(24px,var(--sab)); overflow-y:auto; overscroll-behavior:contain; scroll-padding-block:16px; }
.notification-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:3px; border-radius:var(--radius-control); background:var(--surface-2); }
.notification-filters button { min-width:0; min-height:44px; padding:8px 4px; border:0; border-radius:9px; background:none; color:var(--text-2); font:inherit; font-size:var(--type-caption); }
.notification-filters [aria-pressed=true] { background:var(--selected); color:var(--text); box-shadow:inset 0 0 0 1px var(--line-strong); }
.notification-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 0; }
.notification-text-action { min-height:44px; border:0; background:none; color:var(--link); padding:6px 0; font:inherit; font-size:var(--type-caption); }
.notification-text-action:disabled { color:var(--text-3); opacity:.6; }
#notification-status { font-size:var(--type-caption); line-height:1.5; margin:0; }
#notification-status:not(:empty) { padding:16px 0; }
.notification-day { font-size:var(--type-caption); color:var(--text-3); margin:16px 0 6px; font-weight:500; }
.notification-day:first-child { margin-top:8px; }
.notification-card { position:relative; display:flex; flex-wrap:wrap; gap:6px 10px; padding:14px 0; border-bottom:1px solid var(--line); align-items:flex-start; }
.notification-card:last-child { border-bottom:0; }
.notification-avatar,.notification-wave-icon { width:42px; height:42px; border-radius:50%; overflow:hidden; background:var(--surface-2); color:var(--text); border:0; flex:0 0 42px; font:inherit; display:grid; place-items:center; }
.notification-wave-icon { color:var(--link); background:var(--info-bg); font-size:32px; line-height:1; }
.notification-avatar img { width:100%; height:100%; object-fit:cover; }
.notification-content { flex:1; min-width:0; min-height:44px; text-align:left; border:0; background:none; color:var(--text); font:inherit; padding:0; cursor:pointer; }
.notification-content strong { display:block; font-weight:500; font-size:var(--type-secondary); line-height:1.45; overflow-wrap:anywhere; }
.notification-card.unread .notification-content strong { font-weight:600; }
.notification-excerpt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--text-2); font-size:var(--type-caption); line-height:1.45; margin:4px 0; overflow-wrap:anywhere; }
.notification-content time { display:inline-block; margin-top:5px; color:var(--text-3); font-size:var(--type-small); }
.notification-new { display:inline-block; font-size:var(--type-small); color:var(--link); margin-left:8px; }
.notification-new::before { content:''; display:inline-block; width:5px; height:5px; background:currentColor; border-radius:50%; margin:0 4px 1px 0; }
.notification-poster { width:42px; height:58px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.notification-members { width:100%; padding-left:52px; font-size:var(--type-caption); }
.notification-members summary { display:flex; align-items:center; gap:8px; color:var(--link); cursor:pointer; min-height:44px; list-style:none; }
.notification-members summary::-webkit-details-marker { display:none; }
.notification-members summary::after { content:''; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); margin-top:-4px; }
.notification-members[open] summary::after { transform:rotate(225deg); margin-top:4px; }
.notification-member-list { background:var(--surface-2); border-radius:var(--radius-control); padding:0 12px; }
.notification-member { display:block; min-height:44px; width:100%; text-align:left; border:0; border-top:1px solid var(--line); padding:12px 0; background:none; color:var(--text); font:inherit; line-height:1.45; overflow-wrap:anywhere; }
.notification-member:first-child { border:0; }
.notification-member-more { width:100%; margin:8px 0; }
.notification-empty { text-align:center; padding:48px 16px; }
.notification-empty-symbol { display:grid; place-items:center; width:64px; height:64px; margin:0 auto 18px; border-radius:22px; color:var(--link); background:var(--info-bg); font-size:44px; }
.notification-empty h2 { font-size:var(--type-title); font-weight:600; margin:0 0 8px; }
.notification-empty p { font-size:var(--type-secondary); color:var(--text-3); line-height:1.5; max-width:260px; margin:0 auto; }
.notification-form { display:flex; flex-direction:column; gap:18px; }
.notification-note { margin:0; color:var(--text-3); font-size:var(--type-caption); line-height:1.45; }
.notification-section h2 { color:var(--text-3); font-size:var(--type-caption); font-weight:500; margin:0 0 8px; padding:0 2px; }
.notification-setting-group { background:var(--surface-2); border-radius:14px; overflow:hidden; }
.notification-setting { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; min-height:54px; font-size:var(--type-secondary); cursor:pointer; }
.notification-setting + .notification-setting { border-top:1px solid var(--line); }
.notification-setting-copy { min-width:0; line-height:1.4; }
.notification-setting-copy small { display:block; color:var(--text-3); font-size:var(--type-small); line-height:1.45; margin-top:4px; }
.notification-setting input { appearance:none; -webkit-appearance:none; position:relative; margin:0; width:44px; height:28px; min-height:28px; flex:0 0 44px; border:1px solid var(--line-strong); border-radius:20px; background:var(--surface); cursor:pointer; transition:background .15s; }
.notification-setting input::after { content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:var(--text-3); transition:transform .15s; }
.notification-setting input:checked { background:var(--accent); border-color:var(--accent); }
.notification-setting input:checked::after { background:var(--accent-ink); transform:translateX(16px); }
.notification-times { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:14px; border-top:1px solid var(--line); }
.notification-times label { display:flex; flex-direction:column; gap:8px; min-width:0; font-size:var(--type-caption); color:var(--text-2); }
.notification-times input { display:block; width:100%; max-width:100%; min-width:0; min-height:44px; appearance:none; -webkit-appearance:none; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:8px 10px; font:inherit; font-size:var(--type-action); }
.notification-times input::-webkit-date-and-time-value { text-align:left; min-width:0; }
.notification-zone { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin:0 14px; padding:12px 0; border-top:1px solid var(--line); font-size:var(--type-caption); color:var(--text-2); }
.notification-zone select { min-width:0; max-width:100%; flex:1 1 150px; width:150px; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font:inherit; font-size:var(--type-caption); }
.notification-quiet-hint { padding:0 14px 14px; font-size:var(--type-small); }
.notification-permission { padding:14px; background:var(--surface-2); border-radius:14px; }
.notification-permission strong { font-size:var(--type-secondary); font-weight:500; }
.notification-permission p { margin:5px 0 12px; }
.notification-permission .btn { width:100%; font-size:var(--type-secondary); }
.notification-save { position:sticky; bottom:calc(-1 * max(24px,var(--sab))); padding:12px 0 max(16px,var(--sab)); margin-top:-4px; background:var(--surface); z-index:1; }
.notification-save .btn { width:100%; min-height:48px; }
.notification-highlight { padding:14px; border-radius:14px; border:1px solid var(--line-strong); background:var(--surface-2); margin:16px 0; overflow-wrap:anywhere; }
.notification-highlight p { white-space:pre-wrap; line-height:1.5; }
#notification-more { width:100%; margin-top:12px; }
.notification-body :is(button,input,select,summary):focus-visible { outline:2px solid var(--link); outline-offset:3px; }
@media(max-width:359px) { .notification-body { padding-inline:16px; } .notification-card { gap:6px 8px; } .notification-members { padding-left:50px; } }
@media(prefers-reduced-motion:reduce) { .notification-setting input,.notification-setting input::after { transition:none; } }

/* Keep the account controls together; only their group absorbs free space. */
.home-account-actions { margin-left:auto; display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.home-top .home-account-actions .avatar,.home-account-actions .notification-bell { margin-left:0; }
.notification-badge { top:-1px; right:-1px; min-width:18px; min-height:18px; line-height:16px; border:2px solid var(--bg); font-weight:600; pointer-events:none; }
#notification-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
#notification-status[data-state=error]:not(:empty) { clip-path:none; width:auto; height:auto; left:20px; right:20px; bottom:max(24px,var(--sab)); margin:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); z-index:4; }
#notification-refresh { position:relative; padding-left:22px; }
#screen-notifications[aria-busy=true] #notification-refresh::before { content:''; position:absolute; left:0; top:calc(50% - 6px); width:12px; height:12px; border:1.5px solid var(--line-strong); border-top-color:var(--link); border-radius:50%; animation:notification-spin .8s linear infinite; }
@keyframes notification-spin { to { transform:rotate(360deg); } }
.notification-offer { width:min(400px,calc(100% - 32px)); max-height:calc(100dvh - 64px); overflow:auto; padding:22px; border:1px solid var(--line); border-radius:var(--radius-sheet); background:var(--surface); color:var(--text); }
.notification-offer::backdrop { background:var(--scrim); }
.notification-offer h2 { font-size:var(--type-title); margin:0 0 10px; }
.notification-offer .notification-setting { margin:18px 0; border-radius:14px; background:var(--surface-2); }
.notification-offer > button { display:block; width:100%; min-height:44px; }
.notification-offer .error:empty { display:none; }
.notification-offer .error { margin-bottom:12px; }
.notification-offer :focus-visible { outline:2px solid var(--link); outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { #screen-notifications[aria-busy=true] #notification-refresh::before { animation:none; } }
