.f-nav-link i { font-size: 0.875rem; width: 16px; text-align: center; }
@media (max-width: 480px) { .f-nav-link i { display: none; } }
.um { position: relative; display: inline-flex; }
.um-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 50%;
    cursor: pointer; font-family: inherit;
}
.um-btn:focus-visible { outline: 2px solid rgba(var(--fg), .7); outline-offset: -2px; }
.um-ava {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--fg), .1); color: rgba(var(--fg), .8);
    font-size: 0.875rem; font-weight: 700; line-height: 1;
    transition: box-shadow .15s;
}
.um-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.um-btn:hover .um-ava, .um.open .um-btn .um-ava { box-shadow: 0 0 0 3px rgba(var(--fg), .14); }
.um-ava--lg { width: 40px; height: 40px; font-size: 1rem; }
.um-dot {
    position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%;
    background: rgb(var(--ft-blue, 70,145,255)); box-shadow: 0 0 0 2px var(--pub-bg, var(--bg-primary));
}
.um-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 1001;
    width: 264px; max-width: calc(100vw - 20px); padding: 6px;
    display: flex; flex-direction: column;
    background: var(--pub-bg-raised, var(--bg-card)); border: 1px solid rgba(var(--fg), .1);
    border-radius: var(--radius-lg); box-shadow: 0 18px 48px -14px rgba(0,0,0,.6);
    text-align: left; animation: umIn .14s ease both;
}
.um-panel[hidden] { display: none; }
@keyframes umIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .um-panel { animation: none; } }
.um-head {
    display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-md);
    text-decoration: none; color: inherit; transition: background .12s;
}
.um-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.um-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-role { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-item {
    display: flex; align-items: center; gap: 12px;
    min-height: 40px; padding: 0 12px; border-radius: var(--radius-md);
    font-size: 0.875rem; font-weight: 500; color: rgba(var(--fg), .8); text-decoration: none;
    transition: background .12s, color .12s;
}
.um-form { display: contents; }
button.um-item { width: 100%; background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
.um-head:hover, .um-item:hover { background: rgba(var(--fg), .06); color: var(--text-heading); }
.um-head:focus-visible, .um-item:focus-visible { outline: 2px solid rgba(var(--fg), .6); outline-offset: -2px; }
.um-head[aria-current="page"], .um-item[aria-current="page"] { background: rgba(var(--fg), .09); color: var(--text-heading); }
.um-ic { width: 18px; flex-shrink: 0; text-align: center; font-size: 0.9375rem; color: rgba(var(--fg), .5); transition: color .12s; }
.um-item:hover .um-ic, .um-item[aria-current="page"] .um-ic { color: var(--text-heading); }
.um-count {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgb(var(--ft-blue, 70,145,255)); color: #fff;
    font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.um-count[hidden] { display: none; }
.um-sep { height: 1px; margin: 5px 6px; background: rgba(var(--fg), .08); }
@media (hover: none), (pointer: coarse) {
    .um-item { min-height: 44px; font-size: 0.9375rem; }
}

.pub-bell-wrap { position: relative; display: inline-flex; }
.pub-bell {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer;
    color: rgba(var(--fg), .55); font-size: 1rem; transition: color .15s, background .15s; font-family: inherit;
}
.pub-bell:hover { color: var(--text-heading); background: rgba(var(--fg), .06); }
.pub-bell:focus-visible { outline: 2px solid rgba(var(--fg), .7); outline-offset: -2px; }
.pub-bell-dot {
    position: absolute; top: 9px; right: 10px; width: 8px; height: 8px;
    border-radius: 50%; background: rgb(var(--ft-blue, 70,145,255)); box-shadow: 0 0 0 2px var(--pub-bg, var(--bg-primary));
}
.pub-bell-ring { color: rgba(var(--fg), .85); }
.pub-bell-ring i { transform-origin: 50% 0; animation: pubBellRing .85s cubic-bezier(.36,.07,.19,.97); }
@keyframes pubBellRing {
    0% { transform: rotate(0); }
    15% { transform: rotate(13deg); }
    30% { transform: rotate(-11deg); }
    45% { transform: rotate(8deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0); }
}
.pub-bell-dot--pop { animation: pubDotPop .4s cubic-bezier(.22,1.2,.4,1); }
@keyframes pubDotPop { 0% { transform: scale(0); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
.pub-bell-panel {
    display: none; position: fixed; right: var(--bell-right, 12px); top: var(--bell-top, 64px); z-index: 1000;
    width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, calc(100vh - var(--bell-top, 64px) - 16px));
    flex-direction: column;
    background: var(--pub-bg-raised, var(--bg-card)); border: 1px solid rgba(var(--fg), .1);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 18px 48px -14px rgba(0,0,0,.6);
    text-align: left;
}
.pub-bell-panel.open { display: flex; animation: pubBellIn .16s ease both; }
.pub-bell-scrim { display: none; }
@keyframes pubBellIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pub-bell-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
    padding: 13px 15px; border-bottom: 1px solid rgba(var(--fg), .06);
    font-size: 0.8125rem; font-weight: 700; color: var(--text-heading); text-transform: none; letter-spacing: 0;
}
.pub-bell-readall {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; color: rgba(var(--fg), .55); cursor: pointer;
    font-family: inherit; font-size: 0.75rem; font-weight: 600; padding: 5px 8px;
    border-radius: var(--radius-sm); transition: color .15s, background .15s;
}
.pub-bell-readall:hover { color: var(--text-heading); background: rgba(var(--fg), .06); }
.pub-bell-readall:focus-visible { outline: 2px solid rgba(var(--fg), .7); outline-offset: 2px; }
.pub-bell-actions { display: inline-flex; align-items: center; gap: 4px; }
.pub-bell-close {
    display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px -10px -8px 0;
    background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer;
    color: rgba(var(--fg), .5); font-size: 1.0625rem; transition: color .15s, background .15s;
}
.pub-bell-close:hover { color: var(--text-heading); background: rgba(var(--fg), .06); }
.pub-bell-close:focus-visible { outline: 2px solid rgba(var(--fg), .7); outline-offset: -2px; }
.pub-bell-list { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 5px; scrollbar-width: thin; scrollbar-color: rgba(var(--fg), .15) transparent; }
.pub-bell-all {
    display: block; flex-shrink: 0; text-align: center; padding: 12px;
    border-top: 1px solid rgba(var(--fg), .06); text-decoration: none;
    font-size: 0.75rem; font-weight: 600; color: rgba(var(--fg), .6);
    transition: background .15s, color .15s;
}
.pub-bell-all:hover { background: rgba(var(--fg), .04); color: var(--text-heading); }
.pub-bell-item {
    display: flex; gap: 11px; padding: 11px 12px; text-decoration: none;
    border-radius: var(--radius-md); transition: background .12s; position: relative;
}
.pub-bell-item:hover { background: rgba(var(--fg), .04); }
.pub-bell-item.unread::after {
    content: ""; position: absolute; right: 11px; top: 14px;
    width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--ft-blue, 70,145,255));
}
.pub-bell-item.unread .pub-bell-title { color: rgb(var(--fg)); }
.pub-bell-ico {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-md);
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--fg), .07); color: rgba(var(--fg), .72); font-size: 0.875rem;
}
.pub-bell-ico.ok { color: rgb(var(--ft-green, 52,199,89)); background: rgba(var(--ft-green, 52,199,89), .12); }
.pub-bell-ico.bad { color: rgb(var(--ft-red, 248,81,73)); background: rgba(var(--ft-red, 248,81,73), .12); }
.pub-bell-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; padding-right: 12px; }
.pub-bell-title { font-size: 0.8125rem; font-weight: 700; color: rgba(var(--fg), .85); line-height: 1.35; overflow-wrap: anywhere; }
.pub-bell-msg {
    font-size: 0.75rem; line-height: 1.4; color: rgba(var(--fg), .55); overflow: hidden; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pub-bell-time { font-size: 0.75rem; color: rgba(var(--fg), .58); }
@media (max-width: 640px) {
    .pub-bell-panel {
        top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none;
        max-height: 82vh; max-height: 82dvh;
        border-width: 1px 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    .pub-bell-panel.open { animation: pubBellUp .22s cubic-bezier(.22,.61,.36,1) both; }
    .pub-bell-scrim.open { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.6); }
    .pub-bell-head { padding: 14px 16px; font-size: 0.9375rem; }
    .pub-bell-close { display: inline-flex; }
    .pub-bell-readall { min-height: 40px; font-size: 0.8125rem; }
    .pub-bell-list { padding: 6px 8px; }
    .pub-bell-item { padding: 12px; }
    .pub-bell-title { font-size: 0.875rem; }
    .pub-bell-msg { font-size: 0.8125rem; }
    .pub-bell-time { font-size: 0.75rem; }
    .pub-bell-all { padding: 15px 12px calc(15px + env(safe-area-inset-bottom)); font-size: 0.8125rem; }
}
@keyframes pubBellUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .pub-bell-ring i, .pub-bell-dot--pop, .pub-bell-panel.open { animation: none; }
}
@media (min-width: 2200px) {
    .um-panel { width: 320px; }
    .um-item { min-height: 48px; font-size: 1.0625rem; }
    .um-ic { width: 22px; font-size: 1.125rem; }
    .um-name { font-size: 1.125rem; }
    .um-role { font-size: .875rem; }
    .pub-bell-panel { width: 460px; }
    .pub-bell-title { font-size: 1rem; }
    .pub-bell-ico { width: 40px; height: 40px; font-size: 1.0625rem; }
    .pub-bell-msg, .pub-bell-time { font-size: .9375rem; }
}
